You are not logged in.
Pages: 1
Hi,
I'm pretty new to this arch linux. So far it rocks. I love that I need to do a lot myself compared to Ubuntu. It really feels like the next logical step on my linux journey.
However, with my Lenovo Thinkpad T510 the multimedia keys (volume up/down and mute especially) worked just fine under Debian Gnome3. I wasn't expecting them to work out of the box, especially not with awesome wm. But I don't know how to fix them - I don't really know what to search for. Can anyone help me - point me to some information on the subject.
I have a shot of the buttons in case you don't know which I'm talking about.
http://i.imgur.com/0hDWBFH.png
best regards,
Mads Ravn
moderator edit: Changed image tags to url tags on oversized picture
Last edited by ewaller (2013-05-12 15:04:38)
Offline
Offline
Madsravn,
Welcome to Arch Linux. Please watch the size of pictures you post in line. See our policy
Thanks.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Thanks a lot
Will look into that.
Madsravn,
Welcome to Arch Linux. Please watch the size of pictures you post in line. See our policy
Thanks.
I'm sorry. I'll remember to resize it beforehand the next time.
Offline
What Desktop Environment are you using?
After you identify the key codes that are generated (as provided by Karol's link) , you can use a tool such as xbindkeys to tie those key codes to simple scripts. I use Pulseaudio, so I wrote and use the following to change my volume settings:
ewaller$@$odin /etc/systemd 1008 %cat /usr/local/bin/pavolume
#!/bin/bash
oldvolume=$(pacmd dump|grep set-sink-volume|grep alsa |cut -f3 -d' ')
pacmd dump | grep set-sink-mute | grep alsa | grep yes > /dev/null
oldmute=$?
case $1 in
increase)
newvolume=$(($oldvolume + 0x400))
if (($newvolume >0x10000)) ; then
newvolume=$((0x10000))
fi
pacmd set-sink-volume 0 $(printf '0x%x' $((newvolume)) )
;;
decrease)
newvolume=$(($oldvolume - 0x400))
if (($newvolume < 0 )) ; then
newvolume=$((0x0000))
fi
pacmd set-sink-volume 0 $(printf '0x%x' $((newvolume)) )
;;
mute)
if [[(($oldmute == 0))]] ; then
pacmd set-sink-mute 0 0
else
pacmd set-sink-mute 0 1
fi
;;
*)
echo "usage pavolume increase | decrease | mute"
esacand I bind the keys with xbindkey with this configuration:
ewaller$@$odin ~ 1013 %cat .xbindkeysrc
"xfce4-screenshooter"
Print
"mpc toggle"
XF86AudioPlay
"mpc stop"
XF86AudioStop
"mpc prev"
XF86AudioPrev
"mpc next"
XF86AudioNext
#"/usr/local/bin/pavolume toggle"
"amixer set Master toggle"
XF86AudioMute
#"/usr/local/bin/pavolume increase"
"amixer set Master 1%+"
XF86AudioRaiseVolume
#"/usr/local/bin/pavolume decrease"
"amixer set Master 1%-"
XF86AudioLowerVolume
#"urxvt -depth 32 -fg white -bg rgba:0000/0000/0000/bbbb -g 150x50"
"terminal"
Mod4 + t
"emacs"
Mod4 + e
"chromium"
XF86HomePage
"gmrun"
XF86Save
"thunar"
Mod4 + fEdit: Okay, I lied. I really am not using the script I posted, but I have no recollection as to why
Anyway, you can see that I am driving amixer directly.
Last edited by ewaller (2013-05-12 15:17:12)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
'm sorry. I'll remember to resize it beforehand the next time.
No worries. The best way to do it is to set up a click through tumbnail. Do it like this: [ url=/path/to/thumbnail/picture][ img=/path/to/big/picture][ /url].
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
What Desktop Environment are you using?
After you identify the key codes that are generated (as provided by Karol's link) , you can use a tool such as xbindkeys to tie those key codes to simple scripts. I use Pulseaudio, so I wrote and use the following to change my volume settings:ewaller$@$odin /etc/systemd 1008 %cat /usr/local/bin/pavolume #!/bin/bash oldvolume=$(pacmd dump|grep set-sink-volume|grep alsa |cut -f3 -d' ') pacmd dump | grep set-sink-mute | grep alsa | grep yes > /dev/null oldmute=$? case $1 in increase) newvolume=$(($oldvolume + 0x400)) if (($newvolume >0x10000)) ; then newvolume=$((0x10000)) fi pacmd set-sink-volume 0 $(printf '0x%x' $((newvolume)) ) ;; decrease) newvolume=$(($oldvolume - 0x400)) if (($newvolume < 0 )) ; then newvolume=$((0x0000)) fi pacmd set-sink-volume 0 $(printf '0x%x' $((newvolume)) ) ;; mute) if [[(($oldmute == 0))]] ; then pacmd set-sink-mute 0 0 else pacmd set-sink-mute 0 1 fi ;; *) echo "usage pavolume increase | decrease | mute" esacand I bind the keys with xbindkey with this configuration:
ewaller$@$odin ~ 1013 %cat .xbindkeysrc "xfce4-screenshooter" Print "mpc toggle" XF86AudioPlay "mpc stop" XF86AudioStop "mpc prev" XF86AudioPrev "mpc next" XF86AudioNext #"/usr/local/bin/pavolume toggle" "amixer set Master toggle" XF86AudioMute #"/usr/local/bin/pavolume increase" "amixer set Master 1%+" XF86AudioRaiseVolume #"/usr/local/bin/pavolume decrease" "amixer set Master 1%-" XF86AudioLowerVolume #"urxvt -depth 32 -fg white -bg rgba:0000/0000/0000/bbbb -g 150x50" "terminal" Mod4 + t "emacs" Mod4 + e "chromium" XF86HomePage "gmrun" XF86Save "thunar" Mod4 + fEdit: Okay, I lied. I really am not using the script I posted, but I have no recollection as to why
Anyway, you can see that I am driving amixer directly.
Looks cool. I guess I'm using normal X with my awesome wm. I'm actualy not sure, but I haven't installed anything in particular. Also, I don't actually know what other Desktop Environments are out there.
But thanks for the scripts. Looks like something I can use also. I just need the turn up/down and mute, so that should cover it ![]()
Offline
Pages: 1