mpd widget and ncmpcpp drop
This commit is contained in:
parent
396332a485
commit
62f91ecd03
|
@ -88,6 +88,7 @@ globalkeys = awful.util.table.join(
|
||||||
awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
|
awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
|
||||||
awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpdmenu -a") end),
|
awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpdmenu -a") end),
|
||||||
awful.key({ modkey , "Control" }, "n", function () awful.util.spawn("mpdmenu -j") end),
|
awful.key({ modkey , "Control" }, "n", function () awful.util.spawn("mpdmenu -j") end),
|
||||||
|
awful.key({ modkey }, "`", function () teardrop("urxvtc -e ncmpcpp","bottom","center", 0.99, 0.4)end ),
|
||||||
|
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
|
|
27
wibox.lua
27
wibox.lua
|
@ -28,6 +28,31 @@ clock = widget({ type = "textbox" })
|
||||||
vicious.register(clock, vicious.widgets.date, "%b %d, %R", 60)
|
vicious.register(clock, vicious.widgets.date, "%b %d, %R", 60)
|
||||||
|
|
||||||
|
|
||||||
|
-- music widget {{{
|
||||||
|
mpdwidget = widget({ type = "textbox" })
|
||||||
|
vicious.register(mpdwidget, vicious.widgets.mpd,
|
||||||
|
function(widget, args)
|
||||||
|
if args["{state}"] == "N/A" then
|
||||||
|
return ""
|
||||||
|
else
|
||||||
|
return "[ ♫ "..args["{Artist}"].." - "..args["{Title}"].." ]"
|
||||||
|
end
|
||||||
|
end, 3, {nil, os.getenv("MPD_HOST"), os.getenv("MPD_PORT")})
|
||||||
|
mpdwidget:buttons(awful.util.table.join(
|
||||||
|
awful.button({ }, 1, function () teardrop("urxvtc -e ncmpcpp","top","center", 0.99, 0.4)end )
|
||||||
|
))
|
||||||
|
|
||||||
|
mpdnext = widget({ type = "textbox" })
|
||||||
|
mpdnext.text = "▲"
|
||||||
|
mpdnext:buttons(awful.util.table.join(
|
||||||
|
awful.button({ }, 1, function () awful.util.spawn("mpc next") end)
|
||||||
|
))
|
||||||
|
mpdprev = widget({ type = "textbox" })
|
||||||
|
mpdprev.text = "▼"
|
||||||
|
mpdprev:buttons(awful.util.table.join(
|
||||||
|
awful.button({ }, 1, function () awful.util.spawn("mpc prev") end)
|
||||||
|
))
|
||||||
|
-- }}}
|
||||||
|
|
||||||
-- mail widget {{{
|
-- mail widget {{{
|
||||||
mailwidget = widget({ type = "textbox" })
|
mailwidget = widget({ type = "textbox" })
|
||||||
|
@ -53,7 +78,6 @@ vicious.register(mailwidget, vicious.widgets.mdir,
|
||||||
end, 181, {os.getenv("HOME") .. "/.maildir/"})
|
end, 181, {os.getenv("HOME") .. "/.maildir/"})
|
||||||
--}}}
|
--}}}
|
||||||
|
|
||||||
|
|
||||||
-- battery {{{
|
-- battery {{{
|
||||||
if exists("/proc/acpi/battery/BAT0") then
|
if exists("/proc/acpi/battery/BAT0") then
|
||||||
batwidget0 = widget({ type = "textbox" })
|
batwidget0 = widget({ type = "textbox" })
|
||||||
|
@ -163,6 +187,7 @@ for s = 1, screen.count() do
|
||||||
batwidget2,
|
batwidget2,
|
||||||
wlanwidget,
|
wlanwidget,
|
||||||
spacer, cpulabel, cpuwidget,
|
spacer, cpulabel, cpuwidget,
|
||||||
|
spacer, mpdwidget, mpdnext, spacer, mpdprev,
|
||||||
spacer,
|
spacer,
|
||||||
layout = awful.widget.layout.horizontal.leftright
|
layout = awful.widget.layout.horizontal.leftright
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue