Closes on click-away.
Why?
Alsa audio system comes bundled with most (all?) Puppies (maybe most Linuxes too).
http://www.puppylinux.org/wikka/alsa
I uninstalled/disabled PulseAudio to save RAM (since pulse runs in the background continually). Tiny Alsa volume-control options are hard to find. The VolumeIcon that comes with DebianDog also runs a continuous background process. The excellent Retrovol also runs a continuous background process.
This alternative volume slider doesn't run a continuous background process.
Script
Code: Select all
#!/bin/sh
VolCur=$(amixer -M get Master | awk -v FS="[[%]" '/%/ {print $2}')
yad --scale --max-value 100 --value $VolCur --print-partial --undecorated --width 300 --fixed --sticky --mouse --on-top --escape-ok --no-buttons --close-on-unfocus --hide-value | while read VolNew
do amixer -M -q set Master ${VolNew}%
done
Installation
- Save the script in /usr/local/bin/set-volume
- Make a panel or desktop launcher, which runs set-volume (full path shouldn't be needed)
Explanation
To get current volume. (this may need to change if alsa changes it's messaging in future alsa releases)
VolCur=`amixer -M get Master | grep '%'
https://linux.die.net/man/1/amixer
returns
Mono: Playback 81 [64%] [-34.50dB] [on]
use awk to get % volume.
awk -v FS="(\[|\%)" '{print $2}'`
set new volume
amixer -M -q set Master 25%
yad ref
http://manpages.ubuntu.com/manpages/xen ... yad.1.html
Requires
yad
yad for tahr: http://mirror.internode.on.net/pub/pupp ... ages-tahr/
yad for slacko: https://distro.ibiblio.org/puppylinux/p ... es-slacko/
yad tips: http://murga-linux.com/puppy/viewtopic.php?t=97458
Tips
i like to put it on a launcher with the Alsa Mixer Gui, so i can access the full mixer if needed:
The alsa mixer gui comes bundled with some (most?) Puppies.
https://packages.debian.org/stretch/alsamixergui
Alternate volume control/mixer
Retrovol
http://www.puppylinux.org/wikka/RetroVol
Alsa's own
If you can't use my script above, or alsamixergui, or Retrovol, you can use Alsa's built-in command-window mixer
Code: Select all
# alsamixer
Volume slider
check out my brightness slider
http://murga-linux.com/puppy/viewtopic.php?t=114229
Enjoy!
thx MochiMoppel for improved awk