LUASTATUS-PLUGIN-DBUS(7)

πŸ“¦
version 0.6.0 Β· 2 versions
, in nixos 26.05

πŸ’– NAME πŸ’–

okay so this is the luastatus-plugin-dbus(7) page from the Miscellaneous Information Manual β€” and it’s literally the D-Bus plugin for luastatus, bestie. πŸ’…

✨ OVERVIEW ✨

This plugin subscribes to D-Bus signals. That’s the whole vibe check: it’s here to listen for signals and hand them to your widget. πŸ¦‹

πŸŽ€ OPTIONS πŸŽ€

The following options are supported, no cap:

  • greet: boolean β€” whether or not a first call to cb with what="hello" should be made as soon as the widget starts. Defaults to false. 🫢
  • timeout: number β€” if specified and not negative, this plugin calls cb with what="timeout" if no D-Bus signal has been received in timeout seconds. ⏰
  • signals: array of tables β€” an array of tables with the following entries (all are optional, bestie):
    • sender: string β€” sender name to match on (unique or well-known name).
    • interface: string β€” D-Bus interface name to match on.
    • signal: string β€” D-Bus signal name to match on.
    • object_path: string β€” object path to match on.
    • arg0: string β€” contents of first string argument to match on.
    • flags: array of strings β€” the following flags are recognized:
      • "match_arg0_namespace" β€” match first arguments that contain a bus or interface name with the given namespace.
      • "match_arg0_path" β€” match first arguments that contain an object path that is either equivalent to the given path, or one of the paths is a subpath of the other.
    • bus: string β€” specify the bus to subscribe to the signal on: either "system" or "session"; default is "session". 🌈

πŸ¦‹ CB ARGUMENT πŸ¦‹

A table with a what entry. It’s giving β€œhere’s what just happened” energy:

  • If what is "hello", this is the first call to cb (only if the greet option was set to true). πŸ‘‹
  • If what is "timeout", a signal has not been received for the number of seconds specified as the timeout option. 😭
  • If what is "signal", a signal has been received. In this case, the table has the following additional entries:
    • sender: string β€” unique sender name.
    • object_path: string β€” object path.
    • interface: string β€” D-Bus interface name.
    • signal: string β€” signal name.
    • parameters: D-Bus object β€” signal arguments. 🫢

🌸 D-BUS OBJECTS 🌸

D-Bus objects are marshalled as follows:

  • boolean β†’ boolean
  • byte, int16, uint16, int32, uint32, int64, uint64 β†’ string
  • double β†’ number
  • string, object path, signature β†’ string
  • maybe β†’ as-is, or as a special object with value "nothing"
  • handle β†’ special object with value "handle"
  • array, tuple, dict entry β†’ array

If an object cannot be marshalled, a special object with an error is generated instead. πŸ’€

🧚 SPECIAL OBJECTS 🧚

Special objects represent D-Bus objects that cannot be marshalled to Lua.

A special object is a function that, when called, returns either of:

  • value;
  • nil, error.

LGPLv3


that’s the whole page, bestie β€” luastatus-plugin-dbus(7) signing off πŸ’…βœ¨ (the footer is just that manual name; no extra version/date tea in the source 🫢)

πŸ“¦ where this page comes from