Created
April 24, 2018 15:51
-
-
Save jasonrobot/368cc8e31bc9a0081e69ed5ebb222419 to your computer and use it in GitHub Desktop.
Bind this to your media keys to control whatever pulse audio syncs are active.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
set -l current_sinks (pactl list short sinks | grep -i "running" | awk "{ print \$1 }") | |
for sink in $current_sinks | |
switch $argv[1] | |
case mute unmute | |
echo "toggling mute" | |
pactl set-sink-mute $sink toggle | |
case up | |
echo "volume up" | |
pactl set-sink-volume $sink +4% | |
case down | |
echo "volume down" | |
pactl set-sink-volume $sink -4% | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment