services. This is another inhibiting strategy. It is already being solved by
[systemd-inhibit][] though.
+Dependencies
+============
+
+ * At least Python version 3.5 (e.g. Debian stretch).
+ * python3-dbus
+ * python3-gi
+ * python3-mpd if you intend to use `mpd_watcher.py`
+ * sispmctl if you intend to control a power socket with this tool
+
API
===
the devices changes its state, it must invoke the `changestate` method to
signal interested parties.
-There currently are four implementations. An `OnoffCommand` can be used if the
-state of a device can be changed by invoking a command for either direction.
-The transition is considered complete when the respective command terminates.
-This device is used to implement a power socket with [sispmctl][] in
-`onoff.tools.sispmctl_device`.
+There currently are four implementations.
+
+ * An `OnoffCommand` can be used if the state of a device can be changed by
+ invoking a command for either direction. The transition is considered
+ complete when the respective command terminates. This device is used to
+ implement a power socket with [sispmctl][] in
+ `onoff.tools.sispmctl_device`.
+
+ * An `OnoffProcess` can be used if the device is considered active as long as
+ the process runs. Deactivation is achieved by killing the process. For
+ example [redshift][] can be started in this way.
-An `OnoffProcess` can be used if the device is considered active as long as the
-process runs. Deactivation is achieved by killing the process. For example the
-[redshift][] can be started in this way.
+ dev = onoff.processs.OnoffProcess(["redshift"])
- dev = onoff.processs.OnoffProcess(["redshift"], 3)
+ To account for the time it takes the process to start up, it can be wrapped
+ in a `ThrottledDevice` (see below).
-An `InvertedDevice` can be used to swap the activation states. It can be used
-to activate a device all the time and inhibit activation whenever the inverted
-device is activated. So an `InvertedDevice` wraps an existing `OnoffDevice`.
+ * An `InvertedDevice` can be used to swap the activation states. It can be
+ used to activate a device all the time and inhibit activation whenever the
+ inverted device is activated. So an `InvertedDevice` wraps an existing
+ `OnoffDevice`.
-A `ThrottledDevice` can be used to add artificial delays to the transition
-periods of the activation and deactivation. If a device takes noticeable time
-to settle even after it has been signaled as active, the activation signal can
-be delayed. Similarly if a device should not be switched too often,
-deactivation can be delayed. If the device is reactivated shortly after it has
-been released, it simply keeps being active.
+ * A `ThrottledDevice` can be used to add artificial delays to the transition
+ periods of the activation and deactivation. If a device takes noticeable
+ time to settle even after it has been signaled as active, the activation
+ signal can be delayed. Similarly if a device should not be switched too
+ often, deactivation can be delayed. If the device is reactivated shortly
+ after it has been released, it simply keeps being active.
Once you have an `OnoffDevice` you can pass a dbus bus connection, a name and
the device to the `OnoffControl` constructor. The created object exports the