20 lines
347 B
Lua
20 lines
347 B
Lua
|
local util = {}
|
||
|
|
||
|
util.mpc_command = function(command, callback)
|
||
|
awful.spawn.easy_async(
|
||
|
"mpc --host " .. conf.mpd_host .. " " .. command,
|
||
|
callback
|
||
|
)
|
||
|
end
|
||
|
|
||
|
util.mpc_watch = function(command, timeout, callback, widget)
|
||
|
awful.widget.watch(
|
||
|
"mpc --host " .. conf.mpd_host .. " " .. command,
|
||
|
timeout,
|
||
|
callback,
|
||
|
widget
|
||
|
)
|
||
|
end
|
||
|
|
||
|
return util
|