Configuration
Enable the IPC support to control mpv from the command-line.
~/.config/mpv/mpv.conf
input-ipc-server=~~/socket
Commands
Play / Pause
echo cycle pause | socat - "$XDG_CONFIG_HOME/mpv/socket"
You can add a key-binding to XF86AudioPlay
and XF86AudioPause
media controls.
Next Track
echo playlist-next | socat - "$XDG_CONFIG_HOME/mpv/socket"
You can add a key-binding to XF86AudioNext
media control.
Previous Track
echo playlist-prev | socat - "$XDG_CONFIG_HOME/mpv/socket"
You can add a key-binding to XF86AudioPrev
media control.