Skip to content

Latest commit

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Convenient dbus api in lua.

Works in awesome or with ldbus.

usage

localdbus=require'lua-dbus'ifnotawesomethendbus.init() endlocalfunctionon_signal (...)
-- react on signal hereendlocalsignal_opts= {
bus='session' or'system',
interface='org.freedesktop.DBus', -- or something appropriate ;)
}
-- add signal handlerdbus.on('Signal', on_signal, signal_opts)
-- remove signal handlerdbus.off('Signal', on_signal, signal_opts)
-- call a methoddbus.call('Method', function (...)
-- react on method return results hereend, {
bus='session' or'system',
path='/some/dbus/path', -- change this!interface=signal_opts.interface,
-- just luckily matches here for demonstration purposedestination=signal_opts.interface,
})
-- when runningifnotawesomethenwhiletruedodbus.poll()
endend-- when you're doneifnotawesomethendbus.exit() end

About

convenient dbus api in lua

Resources

Stars

21 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages