dotfiles/bspwm/spotifykeys.sh

20 lines
362 B
Bash
Raw Normal View History

2015-11-21 16:24:00 +11:00
#!/bin/sh
case $1 in
"play")
key="XF86AudioPlay"
;;
"next")
key="XF86AudioNext"
;;
"prev")
key="XF86AudioPrev"
;;
*)
echo "Usage: $0 play|next|prev"
exit 1
;;
esac
xdotool key --window $(xdotool search --name "Spotify (Premium |Unlimited |Free )?- Linux Preview"|head -n1) $key
exit 0