1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 19:22:32 +00:00

Merge pull request #7 from s0nny/master

mpc, ncmpc, ncmpcpp, pms compatibility with music control keybindings added
This commit is contained in:
Luke Bonham 2013-08-19 14:09:41 -07:00
commit b85677727c
7 changed files with 37 additions and 37 deletions

View file

@ -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 ),

View file

@ -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 ),

View file

@ -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

View file

@ -745,19 +745,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 ),

View file

@ -719,19 +719,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 ),

View file

@ -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 ),

View file

@ -692,19 +692,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 ),