Configure MPC bindings with an i3 mode and notifications.
This commit is contained in:
parent
761825df50
commit
935e7b5c0b
6
.bin/mpc/mpc-i3-repeat
Executable file
6
.bin/mpc/mpc-i3-repeat
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [[ "$(mpc repeat)" == *"repeat: on"* ]]; then
|
||||||
|
notify-send -a "Mopidy" -u low -t 1 "Repeat On" "The playlist will be repeated after it is completed"
|
||||||
|
else
|
||||||
|
notify-send -a "Mopidy" -u low -t 1 "Repeat Off" "Playback will stop at the end of the playlist"
|
||||||
|
fi
|
6
.bin/mpc/mpc-i3-shuffle
Executable file
6
.bin/mpc/mpc-i3-shuffle
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [[ "$(mpc random)" == *"random: on"* ]]; then
|
||||||
|
notify-send -a "Mopidy" -u low -t 1 "Shuffle On" "Songs will be played in random order"
|
||||||
|
else
|
||||||
|
notify-send -a "Mopidy" -u low -t 1 "Shuffle Off" "Songs will be played sequentially"
|
||||||
|
fi
|
@ -217,9 +217,30 @@ mode "resize" {
|
|||||||
bindsym Up resize shrink height 10 px or 10 ppt
|
bindsym Up resize shrink height 10 px or 10 ppt
|
||||||
bindsym Right resize grow width 10 px or 10 ppt
|
bindsym Right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
# back to normal: Enter or Escape
|
# back to normal: Enter, Escape, or MOD+R
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
|
bindsym $mod+r mode "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
bindsym $mod+r mode "resize"
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
|
mode "media" {
|
||||||
|
# Shuffle and Repeat
|
||||||
|
bindsym s exec --no-startup-id "~/.bin/mpc/mpc-i3-shuffle"
|
||||||
|
bindsym r exec --no-startup-id "~/.bin/mpc/mpc-i3-repeat"
|
||||||
|
|
||||||
|
# Toggle playback
|
||||||
|
bindsym p exec --no-startup-id "mpc toggle; notify-send -a 'Mopidy' -u low -t 1 'Toggle' 'Toggled playback'
|
||||||
|
|
||||||
|
# Skip between tracks
|
||||||
|
bindsym Right exec --no-startup-id "mpc next; notify-send -a 'Mopidy' -u low -t 1 'Next' 'The current song has been skipped'"
|
||||||
|
bindsym Left exec --no-startup-id "mpc prev; notify-send -a 'Mopidy' -u low -t 1 'Previous' 'Rewound to the previous song'"
|
||||||
|
|
||||||
|
# back to normal: Enter, Escape, or MOD+M
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
bindsym $mod+m mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
bindsym $mod+m mode "media"
|
||||||
|
Loading…
Reference in New Issue
Block a user