Thanks Axel for finding it!
But I want to see that nice OSD to know how high the volume is so my
search continued but then I found this neat shellscript:
http://askubuntu.com/questions/12766/adjust-volume-via-commandline-so-
that-volume-notify-pops-up
So I changed your ~/.xbindkeysrc so that it posts the volume with the nice
notify-OSD also.
It's an ugly hack but hey, it works =)
///////////////////////////////////
gedit ~/.xbindkeysrc
/////
# Increase volume
#"amixer set Master playback 1+"
"sh ~/.volumeHack.sh up -i 2% -m Master"
m:0x0 + c:123
XF86AudioRaiseVolume
# Decrease volume
"sh ~/.volumeHack.sh down -i 2% -m Master"
m:0x0 + c:122
XF86AudioLowerVolume
# Toggle mute - this is not used here
#"amixer set Master toggle"
# m:0x0 + c:121
# XF86AudioMute
///////////////////////////////////
gedit ~/.volumeHack.sh
//////
#!/bin/sh
usage="usage: $0 -c {up|down|mute} [-i increment] [-m mixer]"
command=
increment=5%
mixer=Master
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
/////////////////////
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-settings-daemon in Ubuntu.
https://bugs.launchpad.net/bugs/871133
Title:
Ubuntu Oneric Volume Step Can Not be Changed
Status in “gnome-settings-daemon” package in Ubuntu:
Confirmed
Bug description:
Changing the volume step in gconf-editor does not do anything when adjusting
the volume on a hardware dial.
---
ApportVersion: 1.23-0ubuntu3
Architecture: i386
DistroRelease: Ubuntu 11.10
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110413)
Package: gnome-settings-daemon 3.2.0-0ubuntu5
PackageArchitecture: i386
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Tags: oneiric running-unity
Uname: Linux 3.0.0-12-generic i686
UpgradeStatus: Upgraded to oneiric on 2011-10-08 (3 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare vboxusers
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/871133/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp