awesomewm/modules/mpc/util.lua

24 lines
441 B
Lua
Raw Normal View History

local util = {}
util.mpc_command = function(command, callback)
awful.spawn.easy_async(
2022-11-05 08:42:16 -07:00
"mpc --host " .. config.mpc.host .. " "
.. "--port " .. config.mpc.port .. " "
.. command,
callback
)
end
util.mpc_watch = function(command, timeout, callback, widget)
awful.widget.watch(
2022-11-05 08:42:16 -07:00
"mpc --host " .. config.mpc.host .. " "
.. "--port " .. config.mpc.port .. " "
.. command,
timeout,
callback,
widget
)
end
return util