You are not logged in.
Is there some sort of notification that appears in the center of the screen showing the volume meter upon change, similar to Windows or Ubuntu machines? Do any of these work well in lightweight desktops (dwm, no notification area) and provide instant feedback upon change in volume?
Right now I'm using a bash script that checks the volume every second and displays it in my status bar, but that seems wasteful and still has a 1 second delay when I change the volume.
What are my options?
дɭɭɑӎɠїɾ
Offline
I may be misunderstanding you, but I think volwheel might be what you're looking for. I'm not sure what you mean by "appears in the center of the screen."
Offline
Well, volwheel is a tray icon. I don't have a system tray and don't plan on adding one. Usually, on Windows/Ubuntu/Mac systems, when one changes the volume with the keyboard, a small meter with a volume icon displays near the center of the screen, showing the volume meter as it changes. this is what I'm talking about. Is there anything like this for Arch linux that's nice and light, with few dependencies and little resource usage?
дɭɭɑӎɠїɾ
Offline
Thanks! that worked, except I have a problem with notify-osd. It always appears too far in the top right of my screen, so it ends up covering my status bar. Is there any way to center the notify-osd window?
дɭɭɑӎɠїɾ
Offline
i use my own script ossvol which changes my ossvolume and displays a nice dzen notifacation center screen. it's a modifacation to bruenig's dvol script (just forum search dvol) which does the same thing for alsa. the script itself is very readable so you can adjust color/positioning of the dzen bar. sounds like what you're looking for.
//github/
Offline
Very interesting. I'll definitely check that out if I can't get notify-osd to work how I want. I finally got the nice icons from ubuntu in it and it displays volume changes with no delay, so hopefully I can move the window (even a little bit down would be ok, as long as my status bar isn't covered)
дɭɭɑӎɠїɾ
Offline
Is there some sort of notification that appears in the center of the screen showing the volume meter upon change, similar to Windows or Ubuntu machines? Do any of these work well in lightweight desktops (dwm, no notification area) and provide instant feedback upon change in volume?
I use a Python utility that has an optional GTK progressbar, pvol.py. It doesn't require an external mixer utility but uses Python ossaudiodev library.
You need to install an RTFM interface.
Offline
I have one that is based on the vol.sh script... There are switches that can be added to change the position of the osd overlay. I have mine in the bottom center of my screen. I'ld post the changes, but I'm not at my computer right now.
Knute
Offline
I currently use this:
#!/bin/sh
# Written by Ramses de Norre
# Match only positive integers as second argument
if [[ ${2} =~ ^[0-9]+$ ]]; then
AMM=${2}
else
AMM=1
fi
CTRL="Master"
PREFIX="Volume"
GB_WIDTH=50
GB_HEIGHT=7
DZEN_SEC=3
DZEN_Y="870"
DZEN_X="1300"
DZEN_TA="c"
DZEN_TW="140"
GB_ARGS="-l ${PREFIX} -w ${GB_WIDTH} -h ${GB_HEIGHT}"
DZEN_ARGS="-p ${DZEN_SEC} -ta ${DZEN_TA} -y ${DZEN_Y} -x ${DZEN_X} -tw ${DZEN_TW}"
if [ "$1" = "+" -o "$1" = "-" ]; then
/usr/bin/amixer set ${CTRL} ${AMM}%${1} \
| /bin/sed -n '${s/.*\[\([0-9]*\)%\].*/\1/p}' \
| /usr/bin/gdbar ${GB_ARGS} \
| /usr/bin/dzen2 ${DZEN_ARGS}
else
echo "Wrong usage!" 2>&1
exit 1
fi
exit 0
Offline
Perfect! Bottom center is even better than center. Post your setup of that once you get to your comp.
дɭɭɑӎɠїɾ
Offline
Here it is:
7:56AM % cat voltun.sh ~/bin (knute) pts/0
#!/bin/sh
usage="usage: $0 -c {up|down|mute} [-i increment] [-m mixer]"
command=
increment=5%
mixer=Aux
label=Tuner
while getopts i:m:h o
do case "$o" in
i) increment=$OPTARG;;
m) mixer=$OPTARG;;
h) echo "$usage"; exit 0;;
?) echo "$usage"; exit 0;;
esac
done
shift $(($OPTIND - 1))
command=$1
if [ "$command" = "" ]; then
echo "usage: $0 {up|down|mute} [increment]"
exit 0;
fi
display_volume=0
if [ "$command" = "up" ]; then
display_volume=$(amixer set $mixer $increment+ unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi
if [ "$command" = "down" ]; then
display_volume=$(amixer set $mixer $increment- unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi
icon_name=""
if [ "$command" = "mute" ]; then
if amixer get Master | grep "\[on\]"; then
display_volume=0
icon_name="notification-audio-volume-muted"
amixer set $mixer mute
else
display_volume=$(amixer set $mixer unmute | grep -m 1 "%]" | cut -d "[" -f2|cut -d "%" -f1)
fi
fi
if [ "$icon_name" = "" ]; then
if [ "$display_volume" = "0" ]; then
icon_name="notification-audio-volume-off"
else
if [ "$display_volume" -lt "33" ]; then
icon_name="notification-audio-volume-low"
else
if [ "$display_volume" -lt "67" ]; then
icon_name="notification-audio-volume-medium"
else
icon_name="notification-audio-volume-high"
fi
fi
fi
fi
#notify-send " " -i $icon_name -h int:value:$display_volume -h string:synchronous:volume
osd_cat -p bottom -A center -c green -s 2 -S black -u black -O 6 -d 1 -f -*-profont-*-*-*-*-40-*-*-*-*-*-*-* -b percentage -P $display_volume -T $label
7:56AM % ~/bin (knute) pts/0
Now that I look at it, I see that I used osd_cat. It's still a little rough but it does the job.
Knute
Offline
I use aosd_cat which is provided by the libaosd package. It has no dependencies and I love it with my Openbox setup. This is the script I tie to keybindings:
#!/bin/bash
case $1 in
up) a="Volume: `amixer sset PCM 5%+ unmute | grep "Left:" | awk '{ gsub(/\[/, " "); gsub(/%\]/, " "); print $5 }'`%" ;;
down) a="Volume: `amixer sset PCM 5%- unmute | grep "Left:" | awk '{ gsub(/\[/, " "); gsub(/%\]/, " "); print $5 }'`%" ;;
mute)
case `amixer set Master toggle | grep "Mono:" | awk '{ gsub(/\[/, " "); gsub(/%\]/, " "); print $6 }' | cut -f1 -d]` in
on) a="Unmuted" ;;
*) a="Muted" ;;
esac ;;
*) echo "Usage: $0 { up | down | mute }" ;;
esac
killall aosd_cat &> /dev/null
echo "$a" | aosd_cat --fore-color="#dfe2e8" -p 7 --x-offset=520 --y-offset=-50 --font="bitstream bold 20" --transparency=1 --fade-full=600
(modified version of a script in this thread)
Offline
Well, I tried Knute's solution, and he wasn't kidding. It is rough. It just doesn't look as nice as notify-osd, even after customization.
Unfortunately, libaosd isn't for x86_64 (is it? Can I just change the PKGBUILD?), and I still can't find a way to move notify-osd, which would probably be the ideal solution.
дɭɭɑӎɠїɾ
Offline