aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpauseallmpv6
1 files changed, 5 insertions, 1 deletions
diff --git a/pauseallmpv b/pauseallmpv
index 7c3406f..9ef0e9d 100755
--- a/pauseallmpv
+++ b/pauseallmpv
@@ -1,8 +1,12 @@
#!/bin/sh
+key=$1
+
+[ -z "$key" ] && key='comma'
+
# From Luke Smith
#for i in $(ls /tmp/mpvsoc*); do
# echo '{ "command": ["set_property", "pause", true] }' | socat - "$i";
#done
-xdotool search --class mpv | xargs -I % xdotool key --window % comma
+xdotool search --class mpv | xargs -I % xdotool key --window % "$key"