diff options
Diffstat (limited to 'docs/DBUS.md')
-rw-r--r-- | docs/DBUS.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/DBUS.md b/docs/DBUS.md new file mode 100644 index 000000000..ffbd61f4b --- /dev/null +++ b/docs/DBUS.md | |||
@@ -0,0 +1,20 @@ | |||
1 | # D-Bus interface | ||
2 | |||
3 | Ferdium exposes an inter-process communication on Linux systems via [D-Bus](https://www.freedesktop.org/wiki/Software/dbus/). | ||
4 | This allows integrating Ferdium with your desktop environment by displaying the number of unread notifications in a status area and muting or unmuting notations. | ||
5 | |||
6 | ## Desktop integration | ||
7 | |||
8 | As an example integration, the [`docs/dbus`](dbus) folder contains a module for status bars written in Python. | ||
9 | To run the example, you'll need Python 3.11 and the [`dbus-next`](https://pypi.org/project/dbus-next/) PyPI package. | ||
10 | |||
11 | The integration uses the [`FerdiumClient`](dbus/ferdium_client.py) client library, which is an asynchronous wrapper over the D-Bus interface. | ||
12 | It illustrates multiple advanced concepts, such as asynchronous communication with Ferdium via `asyncio` and polling the session D-Bus to see if Ferdium is running. | ||
13 | |||
14 | The [`ferdium_bar.py`](dbus/ferdium_bar.py) implements a bar module to use with status bars such as waybar or polybar. See `ferdium_bar.py --help` and `ferdium_bar.py unread --help` for further indications on how to use it. | ||
15 | |||
16 | ## Low-level API | ||
17 | |||
18 | The low-level API exposed over D-Bus is documented in [`org.ferdium.Ferdium.xml](docs/org.ferdium.Ferdium.xml) with standard D-Bus introspection syntax. | ||
19 | |||
20 | Ferdium will take ownership of the bus name `org.ferdium.Ferdium` and expose and object implementing the `org.ferdium.Ferdium` interface at the object path `/org/ferdium`. | ||