Merge pull request #7 from s0nny/master
mpc, ncmpc, ncmpcpp, pms compatibility with music control keybindings added
This commit is contained in:
commit
b85677727c
|
@ -741,19 +741,19 @@ globalkeys = awful.util.table.join(
|
||||||
|
|
||||||
-- Music control
|
-- Music control
|
||||||
awful.key({ altkey, "Control" }, "Up", function ()
|
awful.key({ altkey, "Control" }, "Up", function ()
|
||||||
awful.util.spawn( "mpc toggle", false )
|
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end),
|
end),
|
||||||
awful.key({ altkey, "Control" }, "Down", function ()
|
awful.key({ altkey, "Control" }, "Down", function ()
|
||||||
awful.util.spawn( "mpc stop", false )
|
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Left", function ()
|
awful.key({ altkey, "Control" }, "Left", function ()
|
||||||
awful.util.spawn( "mpc prev", false )
|
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Right", function ()
|
awful.key({ altkey, "Control" }, "Right", function ()
|
||||||
awful.util.spawn( "mpc next", false )
|
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
|
|
||||||
|
|
|
@ -665,19 +665,19 @@ globalkeys = awful.util.table.join(
|
||||||
|
|
||||||
-- Music control
|
-- Music control
|
||||||
awful.key({ altkey, "Control" }, "Up", function ()
|
awful.key({ altkey, "Control" }, "Up", function ()
|
||||||
awful.util.spawn( "mpc toggle", false )
|
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end),
|
end),
|
||||||
awful.key({ altkey, "Control" }, "Down", function ()
|
awful.key({ altkey, "Control" }, "Down", function ()
|
||||||
awful.util.spawn( "mpc stop", false )
|
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Left", function ()
|
awful.key({ altkey, "Control" }, "Left", function ()
|
||||||
awful.util.spawn( "mpc prev", false )
|
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Right", function ()
|
awful.key({ altkey, "Control" }, "Right", function ()
|
||||||
awful.util.spawn( "mpc next", false )
|
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
|
|
||||||
|
|
|
@ -335,20 +335,20 @@ musicwidget:set_bgimage(beautiful.widget_bg)
|
||||||
musicwidget:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end)))
|
musicwidget:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end)))
|
||||||
mpd_icon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end)))
|
mpd_icon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end)))
|
||||||
prev_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
prev_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
||||||
awful.util.spawn( "mpc prev", false )
|
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end)))
|
end)))
|
||||||
next_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
next_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
||||||
awful.util.spawn( "mpc next", false )
|
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end)))
|
end)))
|
||||||
stop_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
stop_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
||||||
play_pause_icon:set_image(beautiful.play)
|
play_pause_icon:set_image(beautiful.play)
|
||||||
awful.util.spawn( "mpc stop", false )
|
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end)))
|
end)))
|
||||||
play_pause_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
play_pause_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
||||||
awful.util.spawn( "mpc toggle", false )
|
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end)))
|
end)))
|
||||||
-- /home fs widget
|
-- /home fs widget
|
||||||
|
|
|
@ -744,20 +744,20 @@ globalkeys = awful.util.table.join(
|
||||||
end),
|
end),
|
||||||
|
|
||||||
-- Music control
|
-- Music control
|
||||||
awful.key({ altkey, "Control" }, "Up", function ()
|
awful.key({ altkey, "Control" }, "Up", function ()
|
||||||
awful.util.spawn( "mpc toggle", false )
|
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end),
|
end),
|
||||||
awful.key({ altkey, "Control" }, "Down", function ()
|
awful.key({ altkey, "Control" }, "Down", function ()
|
||||||
awful.util.spawn( "mpc stop", false )
|
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Left", function ()
|
awful.key({ altkey, "Control" }, "Left", function ()
|
||||||
awful.util.spawn( "mpc prev", false )
|
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Right", function ()
|
awful.key({ altkey, "Control" }, "Right", function ()
|
||||||
awful.util.spawn( "mpc next", false )
|
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
|
|
||||||
|
|
|
@ -718,20 +718,20 @@ globalkeys = awful.util.table.join(
|
||||||
end),
|
end),
|
||||||
|
|
||||||
-- Music control
|
-- Music control
|
||||||
awful.key({ altkey, "Control" }, "Up", function ()
|
awful.key({ altkey, "Control" }, "Up", function ()
|
||||||
awful.util.spawn( "mpc toggle", false )
|
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end),
|
end),
|
||||||
awful.key({ altkey, "Control" }, "Down", function ()
|
awful.key({ altkey, "Control" }, "Down", function ()
|
||||||
awful.util.spawn( "mpc stop", false )
|
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Left", function ()
|
awful.key({ altkey, "Control" }, "Left", function ()
|
||||||
awful.util.spawn( "mpc prev", false )
|
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Right", function ()
|
awful.key({ altkey, "Control" }, "Right", function ()
|
||||||
awful.util.spawn( "mpc next", false )
|
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
|
|
||||||
|
|
|
@ -835,19 +835,19 @@ globalkeys = awful.util.table.join(
|
||||||
|
|
||||||
-- Music control
|
-- Music control
|
||||||
awful.key({ altkey, "Control" }, "Up", function ()
|
awful.key({ altkey, "Control" }, "Up", function ()
|
||||||
awful.util.spawn( "mpc toggle", false )
|
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end),
|
end),
|
||||||
awful.key({ altkey, "Control" }, "Down", function ()
|
awful.key({ altkey, "Control" }, "Down", function ()
|
||||||
awful.util.spawn( "mpc stop", false )
|
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Left", function ()
|
awful.key({ altkey, "Control" }, "Left", function ()
|
||||||
awful.util.spawn( "mpc prev", false )
|
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Right", function ()
|
awful.key({ altkey, "Control" }, "Right", function ()
|
||||||
awful.util.spawn( "mpc next", false )
|
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
|
|
||||||
|
|
|
@ -691,20 +691,20 @@ globalkeys = awful.util.table.join(
|
||||||
end),
|
end),
|
||||||
|
|
||||||
-- Music control
|
-- Music control
|
||||||
awful.key({ altkey, "Control" }, "Up", function ()
|
awful.key({ altkey, "Control" }, "Up", function ()
|
||||||
awful.util.spawn( "mpc toggle", false )
|
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end),
|
end),
|
||||||
awful.key({ altkey, "Control" }, "Down", function ()
|
awful.key({ altkey, "Control" }, "Down", function ()
|
||||||
awful.util.spawn( "mpc stop", false )
|
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Left", function ()
|
awful.key({ altkey, "Control" }, "Left", function ()
|
||||||
awful.util.spawn( "mpc prev", false )
|
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
awful.key({ altkey, "Control" }, "Right", function ()
|
awful.key({ altkey, "Control" }, "Right", function ()
|
||||||
awful.util.spawn( "mpc next", false )
|
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||||
vicious.force({ mpdwidget } )
|
vicious.force({ mpdwidget } )
|
||||||
end ),
|
end ),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue