[sway] Add MPD mode
Copied from i3
This commit is contained in:
parent
1914e3f0db
commit
2fb55ea9af
2 changed files with 29 additions and 1 deletions
|
@ -165,7 +165,7 @@ bindsym $mod+d exec "$launcher"
|
|||
set $mpc /usr/bin/mpc
|
||||
set $mpdmode "local mpd: [ ] play/pause, [k/j] prev/next, [h/l] rwnd/ffwd, [u/d] vol, [enter] open client"
|
||||
mode $mpdmode {
|
||||
bindsym space exec --no-startup-id $mpc toggle
|
||||
bindsym space exec --no-startup-id $mpc toggle, mode "default"
|
||||
bindsym j exec --no-startup-id $mpc next
|
||||
bindsym k exec --no-startup-id $mpc cdprev
|
||||
bindsym h exec --no-startup-id $mpc seek -5
|
||||
|
|
28
sway/config
28
sway/config
|
@ -334,6 +334,9 @@ mode "resize" {
|
|||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
#
|
||||
# MPD:
|
||||
#
|
||||
bindsym --locked XF86AudioPlay exec "mpc toggle"
|
||||
bindsym --locked XF86AudioPrev exec "mpc cdprev"
|
||||
bindsym --locked XF86AudioNext exec "mpc next"
|
||||
|
@ -341,6 +344,31 @@ bindsym --locked XF86AudioLowerVolume nop
|
|||
bindsym --locked XF86AudioRaiseVolume nop
|
||||
bindsym --locked XF86AudioMute nop
|
||||
|
||||
set $mpc /usr/bin/mpc
|
||||
set $mpdmode "local mpd: [ ] play/pause, [k/j] prev/next, [h/l] rwnd/ffwd, [u/d] vol, [enter] open client"
|
||||
set $mpdclient $term -e ncmpcpp
|
||||
mode $mpdmode {
|
||||
bindsym space exec --no-startup-id $mpc toggle, mode default
|
||||
bindsym j exec --no-startup-id $mpc next
|
||||
bindsym k exec --no-startup-id $mpc cdprev
|
||||
bindsym h exec --no-startup-id $mpc seek -5
|
||||
bindsym l exec --no-startup-id $mpc seek +5
|
||||
bindsym Backspace exec --no-startup-id $mpc seek 0%
|
||||
bindsym u exec --no-startup-id $mpc volume +$volumeStep
|
||||
bindsym d exec --no-startup-id $mpc volume -$volumeStep
|
||||
bindsym s exec --no-startup-id $mpc stop, mode "default"
|
||||
bindsym Return exec $mpdclient, mode "default"
|
||||
bindsym KP_Enter exec $mpdclient, mode "default"
|
||||
bindsym o exec $mpdclient, mode "default"
|
||||
|
||||
# back to normal: Escape or mod+m
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+m mode "default"
|
||||
}
|
||||
bindsym $mod+m mode $mpdmode
|
||||
|
||||
# ---
|
||||
|
||||
bindsym Print exec grim -g "$(slurp)" "/tmp/screenshot-$(date +%Y-%m-%d_%H-%M-%S).png"
|
||||
|
||||
for_window [title="^Firefox — Sharing Indicator$"] {
|
||||
|
|
Loading…
Reference in a new issue