Copy it to a bin dir like `/usr/local/bin` execute with :
- pavolume.sh --up
- pavolume.sh --down
- pavolume.sh --togmute (this will change the mute status to the opposite of what it is currently - useful for a single key that does both)
- pavolume.sh --sync (this will sync all of your current apps using the current active/default output to the same volume level)
In the beggining of the script you'll see four useful settings/variables :
- The 'osd' variable. If you want to display an OSD message when changing volume set to yes. It's setup for kde and the KOSD package - so you might have to install that.
- The 'inc' variable. This is the increment that each volume up/down request will preform. 5 is default.
- The 'capvol' variable. This will cap the max volume to 100% (since pulseaudio by default allows you to go over this limit). Defaults to 'yes'.
- The 'maxvol' variable. This will cap the maximum volume to another percent (capvol overrides this if set to yes). Pulse will keep increasing the volume to several thousand percent, so here you can set a much more respectable number. Defaults to '200'.
- The 'autosync' variable. This will automatically sync all your sink-inputs (apps) with the current volume of your output (speakers) whenever you change the volume. This is useful if you manage multiple outputs and have issues with the app volumes becoming out of sync with the output (they should move up/down together). If you like keeping apps at different volumes then you should change this to no, and maybe bind a keystroke for manual sync if you so desire.
If you wish to use kosd it's in portage for Gentoo:
- emerge -av kosd
- After installation you have to restart kde to get it to load.
If you wish to remove the volume cap (IE - have your max volume over 100%) you will need to apply the following patch to kosd. If you're using Gentoo (and you probably should be), all you need to do is put this patch in the `/etc/portage/patches/kde-misc/kosd/` directory.
You can also download the maxvol.patch here : http://pastebin.com/yCgVtmUZ
- Afterwards go to systemsettings -> Shortcuts and Gestures -> Custom Shortcuts -> Add new shortcuts bound to the commands listed above.
You can also download the script here : http://pastebin.com/ZqWt3A5q