mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 11:12:31 +00:00
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
|
||||
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 } )
|
||||
end),
|
||||
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 } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
|
||||
|
|
|
@ -665,19 +665,19 @@ globalkeys = awful.util.table.join(
|
|||
|
||||
-- Music control
|
||||
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 } )
|
||||
end),
|
||||
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 } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
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 } )
|
||||
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)))
|
||||
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 ()
|
||||
awful.util.spawn( "mpc prev", false )
|
||||
awful.util.spawn_with_shell( "mpc prev || ncmpcpp prev || ncmpc prev || pms prev", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end)))
|
||||
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 } )
|
||||
end)))
|
||||
stop_icon:buttons(awful.util.table.join(awful.button({}, 1, function ()
|
||||
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 } )
|
||||
end)))
|
||||
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 } )
|
||||
end)))
|
||||
-- /home fs widget
|
||||
|
|
|
@ -744,20 +744,20 @@ globalkeys = awful.util.table.join(
|
|||
end),
|
||||
|
||||
-- Music control
|
||||
awful.key({ altkey, "Control" }, "Up", function ()
|
||||
awful.util.spawn( "mpc toggle", false )
|
||||
awful.key({ altkey, "Control" }, "Up", function ()
|
||||
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end),
|
||||
awful.key({ altkey, "Control" }, "Down", function ()
|
||||
awful.util.spawn( "mpc stop", false )
|
||||
awful.key({ altkey, "Control" }, "Down", function ()
|
||||
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
awful.key({ altkey, "Control" }, "Right", function ()
|
||||
awful.util.spawn( "mpc next", false )
|
||||
awful.key({ altkey, "Control" }, "Right", function ()
|
||||
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end ),
|
||||
|
||||
|
|
|
@ -718,20 +718,20 @@ globalkeys = awful.util.table.join(
|
|||
end),
|
||||
|
||||
-- Music control
|
||||
awful.key({ altkey, "Control" }, "Up", function ()
|
||||
awful.util.spawn( "mpc toggle", false )
|
||||
awful.key({ altkey, "Control" }, "Up", function ()
|
||||
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end),
|
||||
awful.key({ altkey, "Control" }, "Down", function ()
|
||||
awful.util.spawn( "mpc stop", false )
|
||||
awful.key({ altkey, "Control" }, "Down", function ()
|
||||
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
awful.key({ altkey, "Control" }, "Right", function ()
|
||||
awful.util.spawn( "mpc next", false )
|
||||
awful.key({ altkey, "Control" }, "Right", function ()
|
||||
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end ),
|
||||
|
||||
|
|
|
@ -835,19 +835,19 @@ globalkeys = awful.util.table.join(
|
|||
|
||||
-- Music control
|
||||
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 } )
|
||||
end),
|
||||
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 } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
|
||||
|
|
|
@ -691,20 +691,20 @@ globalkeys = awful.util.table.join(
|
|||
end),
|
||||
|
||||
-- Music control
|
||||
awful.key({ altkey, "Control" }, "Up", function ()
|
||||
awful.util.spawn( "mpc toggle", false )
|
||||
awful.key({ altkey, "Control" }, "Up", function ()
|
||||
awful.util.spawn_with_shell( "mpc toggle || ncmpcpp toggle || ncmpc toggle || pms toggle", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end),
|
||||
awful.key({ altkey, "Control" }, "Down", function ()
|
||||
awful.util.spawn( "mpc stop", false )
|
||||
awful.key({ altkey, "Control" }, "Down", function ()
|
||||
awful.util.spawn_with_shell( "mpc stop || ncmpcpp stop || ncmpc stop || pms stop", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end ),
|
||||
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 } )
|
||||
end ),
|
||||
awful.key({ altkey, "Control" }, "Right", function ()
|
||||
awful.util.spawn( "mpc next", false )
|
||||
awful.key({ altkey, "Control" }, "Right", function ()
|
||||
awful.util.spawn_with_shell( "mpc next || ncmpcpp next || ncmpc next || pms next", false )
|
||||
vicious.force({ mpdwidget } )
|
||||
end ),
|
||||
|
||||
|
|
Loading…
Reference in a new issue