Skip to content

Latest commit

History

37 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,
error_callback=function(error_text)
-- react on error hereend,
})
-- when runningifnotawesomethenwhiletruedodbus.poll()
endend-- when you're doneifnotawesomethendbus.exit() end

About

convenient dbus api in lua

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages