A simple script to help change which audio devices we would like to use; speaker or headphone.
- yq ( https://github.com/mikefarah/yq )
- Note: don't confuse with another yq, which is just a wrapper for jq
- pactl
- Arch: provided by libpulse
- Ubuntu: provided by pulseaudio-utils
- notify-send
- Arch: provided by libnotify
- Ubuntu: provided by libnotify-bin
- Make sure required dependencies has been installed
- Clone this repository into
$REPOPATH(e.g: /home/kucing/github) of your choosing - Navigate into
$REPOPATHand install usinginstall.sh - Edit
audio-switcher.yamlas needed using theaudio-switcher.yaml.exampleas a reference.- Or you can just run
audio-switcher.shin terminal, and it will tell you what needed to be done.
- Or you can just run
- Voila!
-
To change audio devices
$ audio-switcher.sh -
To increase volume
$ audio-switcher.sh up -
To decrease volume
$ audio-switcher.sh down
It would be better if you assigned this to a hotkey so that it's easier to use.
My personal fav is:
| Hotkey | Command | Description |
|---|---|---|
| F8 | $REPOPATH/audio-switcher.sh |
To change audio device |
| F11 | $REPOPATH/audio-switcher.sh down |
To decrease volume |
| F12 | $REPOPATH/audio-switcher.sh up |
To increase volume |
Note: change $REPOPATH to actual path containing audio-switcher.sh