Nheko DBUS
Nheko is my current favourite client for the Matrix IM system, which is my favourite IM system.
Matrix is an open system with end to end encryption and Nheko is free software and runs well on Linux desktops and phones.
The Nheko client allows interaction with dbus which could be good for automating things, EG you could change the status message when unlocking the screen. I’m documenting the most useful ones here because they don’t seem to be documented anywhere else. I have filed a Debian bug about the activate room option not working. The qdbus6 program is the QT6 version of the dbus command-line query program, there are a range of other programs which work in much the same way.
# list all interfaces qdbus6 im.nheko.Nheko / # get the version of Nheko qdbus6 im.nheko.Nheko / im.nheko.Nheko.nhekoVersion # list rooms in a dump of the data structures (pity it's not json or something) qdbus6 --literal im.nheko.Nheko / im.nheko.Nheko.rooms|less # join a room qdbus6 im.nheko.Nheko / im.nheko.Nheko.joinRoom "#flounder-random:luv.asn.au" # supposed to activate a room but doesn't qdbus6 im.nheko.Nheko / im.nheko.Nheko.activateRoom "#flounder-random:luv.asn.au" # set the status qdbus6 im.nheko.Nheko / im.nheko.Nheko.setStatusMessage "whatever" # get the status qdbus6 im.nheko.Nheko / im.nheko.Nheko.statusMessage
Here are a couple of examples of using other dbus clients to get similar results. Note that the difference between the Debian version of Nheko (and maybe other recent versions) and what LLMs return for usage examples is that Debian has “/” as the path while the examples have “/im/nheko/Nheko”.
# list rooms via gdbus gdbus call --session --dest im.nheko.Nheko --object-path / --method im.nheko.Nheko.rooms # get status via dbus-send dbus-send --session --print-reply --type=method_call --dest=im.nheko.Nheko / im.nheko.Nheko.statusMessage