Skip to content

Instantly share code, notes, and snippets.

@adpande
Last active May 16, 2022 12:18
Show Gist options
  • Save adpande/ced583c2a7a827f9e217f2fddda8e04b to your computer and use it in GitHub Desktop.
Save adpande/ced583c2a7a827f9e217f2fddda8e04b to your computer and use it in GitHub Desktop.
#!/bin/bash
sink=alsa_output.pci-0000_0a_00.4.analog-surround-21
# pactl set-default-sink alsa_output.pci-0000_0a_00.4.analog-surround-21
# usage
# chmod +x sound.sh
# sound.sh <function>
default(){
pactl set-default-sink $sink
}
volup(){
pactl set-sink-volume $sink +5%
}
voldown(){
pactl set-sink-volume $sink -5%
}
volmute(){
pactl set-sink-mute $sink toggle
}
next(){
playerctl --all-players next
}
prev(){
playerctl --all-players previous
}
pause(){
playerctl --all-players play-pause
}
stopit(){
playerctl --all-players stop
}
spotify(){
spotify
}
hello(){
echo "Sets the sound card"
}
"$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment