Page 1 of 1

How to edit VolumeUp/VolumeDown buttons in Ubuntu 8.04.1

Posted: Fri Jan 23, 2009 9:48 am
by masterus
hi,

would like to know if there is a chance to edit some file (if yes then waht file) which let me know
to edit VolumeUp/VolumeDown buttons :?:
mean would like to change sound increasing/decreasing for 5%
would be very gratefull for all answers.

rgds,

Re: How to edit VolumeUp/VolumeDown buttons in Ubuntu 8.04.1

Posted: Fri Jan 23, 2009 10:37 am
by GomJabbar
AFAIK, the hardware buttons work on any OS for the T42. I would have thought the T43 would be the same. I don't think some of the newer ThinkPads volume buttons will necessarily work out-of-the-box though.

I see there is something about the headphone or line jack needing to be muted to hear sound with Alsa.

http://alsa.opensrc.org/FAQ004

Re: How to edit VolumeUp/VolumeDown buttons in Ubuntu 8.04.1

Posted: Mon Feb 02, 2009 8:31 am
by Ryushin
The newer thinkpad volume control buttons are software based. I had to write a hack to use xbindkeys to make everything work. Note, I run Debian and Enlightenment 17 for my window manager, but things should mostly be the same with Ubuntu.

Install xbindkeys.

I added these entries to ~/.xbindkeysrc:
# Thinkpad Volume Up
"aumix -v +5;~/bin/show_volume_osd.bash"
m:0x0 + c:176

# Thinkpad Volume Down
"aumix -v -5;~/bin/show_volume_osd.bash"
m:0x0 + c:174

This first part of it, aumix -v +5/-5 actually changes the volume. I added the OSD so you can see it change. I think the latest gnome shows it as well without having to use OSD.

My show volume looks like this:
#!/bin/bash

VOLUME=$(aumix -q | grep vol | awk {'print $3'})
osd_cat -A center -T VOLUME -b percentage -d 1 -c green -P $VOLUME -p bottom -o 50 -f -*-lucidatypewriter-*
-*-*-*-*-240-*-*-*-200-*-*

That last line is actually all one line.