Skip to content

Instantly share code, notes, and snippets.

@abenson
Created April 25, 2018 14:21
Show Gist options
  • Select an option

  • Save abenson/6c4c34717a1fd87dfa8f206ce7762e41 to your computer and use it in GitHub Desktop.

Select an option

Save abenson/6c4c34717a1fd87dfa8f206ce7762e41 to your computer and use it in GitHub Desktop.
#!/bin/sh
case "$1" in
"up" )
amixer set Master 1%+
;;
"down" )
amixer set Master 1%-
;;
"toggle" )
amixer set Master toggle
amixer get Master | fgrep -q '[on]'
if [ $? -eq 0 ]; then
amixer set Speaker unmute
fi
;;
*)
echo "usage: $0 <up|down|toggle>"
;;
esac
@abenson
Copy link
Author

abenson commented Mar 5, 2020

bindsym XF86AudioMute exec --no-startup-id /usr/local/bin/volume toggle
bindsym XF86AudioLowerVolume exec --no-startup-id /usr/local/bin/volume down
bindsym XF86AudioRaiseVolume exec --no-startup-id /usr/local/bin/volume up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment