[StumpWM] Control media through playerctl rather than mpc directly

This commit is contained in:
Lucien Cartier-Tilet 2022-08-31 03:46:45 +02:00
parent 78d4736863
commit 0050fc966e
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 13 additions and 13 deletions

View File

@ -1416,10 +1416,10 @@ with Emacs buffers.
:PROPERTIES:
:CUSTOM_ID: Keybinds-Media-and-Media-Control-hbv5uk91z5j0
:END:
My music is managed through MPD, and I often use ~mpc~ commands in order
to interact with it without any GUI application. So, well see a lot
of its usage here, and numerous commands used here come from the ~mpd~
minor mode loaded [[#Init-file-l3q4snd1u5j0][above]].
My music is managed through MPD, and I often use ~playerctl~ commands in
order to interact with it without any GUI application. So, well see a
lot of its usage here, and numerous commands used here come from the
~mpd~ minor mode loaded [[#Init-file-l3q4snd1u5j0][above]].
First, lets declare an interactive keymap in order to easily change
several times in a row either the current song playing or the volume
@ -1488,14 +1488,14 @@ Then, lets declare a keymap for our media controls.
| Keychord | Function |
|----------+-----------------------------------|
| ~.~ | ~media-interactive~ |
| ~«~ | ~mpd-prev~ |
| ~»~ | ~mpd-next~ |
| ~«~ | ~exec playerctl previous~ |
| ~»~ | ~exec playerctl next~ |
| ~a~ | ~'*my-mpd-add-map*~ |
| ~b~ | ~'*my-mpd-browse-map*~ |
| ~c~ | ~mpd-clear~ |
| ~m~ | ~mpc-interactive~ |
| ~p~ | ~mpd-toggle-pause~ |
| ~s~ | ~mpd-stop~ |
| ~p~ | ~exec playerctl play-pause~ |
| ~s~ | ~exec playerctl stop~ |
| ~u~ | ~mpd-update~ |
| ~n~ | ~exec kitty ncmpcpp -q~ |
| ~v~ | ~exec kitty ncmpcpp -qs visualizer~ |
@ -1527,11 +1527,11 @@ media-related, but Ill add keybinds for my screens backlight.
#+caption: Top-level media keys
| Keychord | Function |
|-----------------------+-----------------------------------|
| ~XF86AudioPlay~ | ~mpd-toggle-pause~ |
| ~XF86AudioPause~ | ~exec mpc pause~ |
| ~XF86AudioStop~ | ~mpd-stop~ |
| ~XF86AudioPrev~ | ~mpd-prev~ |
| ~XF86AudioNext~ | ~mpd-next~ |
| ~XF86AudioPlay~ | ~exec playerctl play-pause~ |
| ~XF86AudioPause~ | ~exec playerctl pause~ |
| ~XF86AudioStop~ | ~exec playerctl stop~ |
| ~XF86AudioPrev~ | ~exec playerctl previous~ |
| ~XF86AudioNext~ | ~exec playerctl next~ |
| ~XF86AudioRaiseVolume~ | ~exec pamixer -i 2~ |
| ~XF86AudioLowerVolume~ | ~exec pamixer -d 2~ |
| ~XF86AudioMute~ | ~exec pamixer -t~ |