Reworked config, added module autoloader

This commit is contained in:
2022-07-16 19:06:55 -07:00
parent 9da54839fb
commit 2c034c36ed
20 changed files with 256 additions and 292 deletions

View File

@ -2,14 +2,14 @@ local util = {}
util.mpc_command = function(command, callback)
awful.spawn.easy_async(
"mpc --host " .. conf.mpd_host .. " " .. command,
"mpc --host " .. config.mpc.host .. " " .. command,
callback
)
end
util.mpc_watch = function(command, timeout, callback, widget)
awful.widget.watch(
"mpc --host " .. conf.mpd_host .. " " .. command,
"mpc --host " .. config.mpc.host .. " " .. command,
timeout,
callback,
widget

View File

@ -6,14 +6,14 @@ mpc_widget.title.valign = "center"
mpc_widget.title.align = "left"
mpc_widget.title.font = "Hack NF 12"
mpc_widget.title.ellipsize = "end"
mpc_widget.title.forced_width = beautiful.dpi(conf.mpc_width)
mpc_widget.title.forced_width = beautiful.dpi(config.mpc.width)
mpc_widget.artist = wibox.widget.textbox("connected")
mpc_widget.artist.valign = "center"
mpc_widget.artist.align = "left"
mpc_widget.artist.font = "Hack NF 12"
mpc_widget.artist.ellipsize = "end"
mpc_widget.artist.forced_width = beautiful.dpi(conf.mpc_width)
mpc_widget.artist.forced_width = beautiful.dpi(config.mpc.width)
mpc_widget.volume = wibox.widget.textbox("??")
mpc_widget.volume.valign = "center"