Skip to content

Instantly share code, notes, and snippets.

@John-Gee
Created October 29, 2016 22:30
Show Gist options
  • Save John-Gee/85d61999c73bab5b3c723a5141ea20d3 to your computer and use it in GitHub Desktop.
Save John-Gee/85d61999c73bab5b3c723a5141ea20d3 to your computer and use it in GitHub Desktop.
Script to trigger the issue
#!/bin/bash
file=$1
while true
do
# get the window id
WID=`xdotool search "mpv" | head -1`
if [ -z "$WID" ]; then
mpv $file &
# got to wait for mpv to start before doing anything again
sleep 1
continue
fi
val=`shuf -i0-1 -n1| bc`
if [ $val -eq 0 ]; then
xdotool key --window $WID Up
else
xdotool key --window $WID Down
fi
dmesg > dmesg.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment