¶Updates
- Finish your taxes!
I’ve started working on a book about building a modern desktop environment with Sway in Guix (and Linux)!
Keep an eye out here for early access: https://ko-fi.com/SystemCrafters
¶Exploring D-Bus with Emacs APIs
D-Bus is a standard part of the Linux desktop environment! Emacs provides a nice set of functions for interacting with system-level and user-level D-Bus services.
We’ll be exploring D-Bus with these functions in the M-x ielm
REPL!
- https://www.freedesktop.org/wiki/Software/dbus/
- https://www.freedesktop.org/wiki/Software/DbusProjects/
- https://en.wikipedia.org/wiki/D-Bus
- https://www.gnu.org/software/emacs/manual/html_mono/dbus.html
- https://github.com/flatpak/xdg-desktop-portal
- https://stackoverflow.com/questions/4474290/how-do-i-use-emacss-dbus-interface
- https://github.com/sinic/ednc
(dbus-call-method :session "org.freedesktop.Notifications" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "Notify" "SystemCrafters" 0 "" "Summary" "Body" '(:array) '(:array :signature "{sv}") :int32 -1)
¶Listing known D-Bus services in the user session
(dbus-list-known-names :session)
¶Finding all “nodes” (object paths) for a service
(dbus-introspect-get-all-nodes "org.freedesktop.portal.Documents" "/")
¶List all interfaces for a given node
(dbus-introspect-get-interface-names :session "org.freedesktop.portal.Documents" "/org/freedesktop/portal/documents")
¶Describe a particular interface
(dbus-introspect-get-interface :session "org.freedesktop.portal.Documents" "/org/freedesktop/portal/documents" "org.freedesktop.portal.Documents")
¶Call a simple method
(dbus-call-method :session "org.freedesktop.portal.Documents" "/org/freedesktop/portal/documents" "org.freedesktop.portal.Documents" "GetMountPoint")