mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-03 14:54:21 +02:00
music: also allows one to use modal keys to control music player
By using mod+s, we switch to a local keymap that control the music player. The keys are then the same as in XMMS.
This commit is contained in:
parent
8f6b6733bc
commit
049e7abdfd
1 changed files with 16 additions and 0 deletions
|
@ -220,6 +220,22 @@ config.keys.global = awful.util.table.join(
|
|||
awful.key({ }, "XF86AudioNext", music.next),
|
||||
awful.key({ }, "XF86AudioPrev", music.previous),
|
||||
|
||||
awful.key({ modkey }, "s", function()
|
||||
keygrabber.run(function(mod, key, event)
|
||||
if event == "release" then
|
||||
return true
|
||||
end
|
||||
keygrabber.stop()
|
||||
if key == "z" then music.previous()
|
||||
elseif key == "x" then music.play()
|
||||
elseif key == "c" then music.pause()
|
||||
elseif key == "v" then music.stop()
|
||||
elseif key == "b" then music.next()
|
||||
end
|
||||
return true
|
||||
end)
|
||||
end),
|
||||
|
||||
-- Help
|
||||
awful.key({ modkey, }, "F1", keydoc.display)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue