Skip to content

Instantly share code, notes, and snippets.

@vician
Created December 15, 2017 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vician/cf872d2230a88ec2b69fb46ef3d695e5 to your computer and use it in GitHub Desktop.
Save vician/cf872d2230a88ec2b69fb46ef3d695e5 to your computer and use it in GitHub Desktop.
#!/bin/bash
sleep 0.5;
choice="$1"
if [ "$choice" == "play" ] || [ "$choice" == "playpause" ] || [ "$choice" == "pause" ]; then
xdotool key XF86AudioPlay
elif [ "$choice" == "up" ] || [ "$choice" == "volumeup" ]; then
xdotool key XF86AudioRaiseVolume
elif [ "$choice" == "down" ] || [ "$choice" == "volumedown" ]; then
xdotool key XF86AudioLowerVolume
elif [ "$choice" == "mute" ] ; then
xdotool key XF86AudioMute
elif [ "$choice" == "next" ] ; then
xdotool key XF86AudioNext
elif [ "$choice" == "prev" ] ; then
xdotool key XF86AudioPrev
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment