github.com/stefano-m/lua-dbus_proxy ↗
Simple API around GLib's GIO:GDBusProxy built on top of lgi
Open this visualization on its own page →
Contributors
5
Lines of Code
122
From
2017-04-08
To
2021-02-02
About stefano-m/lua-dbus_proxy
lua-dbus_proxy is a Lua module that provides a simplified interface to GLib's GDBusProxy objects through the lgi bindings. It makes it easier for Lua developers to interact with DBus interfaces by automatically exposing the properties, methods, and signals of remote DBus objects as accessible elements in a Lua table. The module follows DBus naming conventions, typically presenting these elements in CamelCase, though it handles edge cases like properties that share names with methods by adding underscores to prevent conflicts.
The project was created to address reliability issues in the author's previous DBus solutions for the Awesome Window Manager. It replaces an older approach that depended on ldbus and ldbus_api, libraries that suffered from crashes and lack of maintenance. By leveraging lgi's more robust GIO proxy implementation, the module offers better stability for building DBus-dependent widgets and applications. The code is released under the Apache License 2.0 and can be installed via Luarocks or NixOS packages.
To function properly, lua-dbus_proxy requires the Lua application to run within GLib's main event loop so that property changes and signals from remote DBus objects are properly synchronized. The project includes comprehensive documentation built with ldoc, unit tests using the busted framework, and is actively maintained with contributions welcome through GitHub issues. Awesome Window Manager users benefit from automatic main loop integration, while other applications must explicitly manage GLib's event loop.