Skip to content

Instantly share code, notes, and snippets.

View uunnxx's full-sized avatar
🏠
Working from home

バカです uunnxx

🏠
Working from home
View GitHub Profile
@dwgill
dwgill / mpvctl
Last active January 25, 2023 02:00
A small script for controlling mpv via the JSON IPC. Intended to resemble playerctl.
#!/usr/bin/env bash
# This script requires:
# - that the directory $HOME/.mpv exist
# - that the program socat be installed
# - that you start mpv with the unix socket feature pointing at that directory
# I recommend an alias in your .bashrc or equivalent file:
# alias mpv="mpv --input-unix-socket=$HOME/.mpv/socket"
socket="$HOME/.mpv/socket"