You are not logged in.

#1 2013-07-13 19:22:04

Fallon911
Member
Registered: 2013-03-01
Posts: 15

[Question] How to use mplayer as an XFCE Keyboard Shortcut

Currently I have set my volume keys to increase and decrease the volume. This works fine. I assigned a shortcut in the XFCE "Keyboard > Applications Shortcuts" area.

However, if you have ever used Apple's OS X, you likely have heard the popping noises produced when increasing or decreasing the volume.

Going on the assumption that any command which works in the terminal would work as a keyboard shortcut, I have assigned my volume keys the following shortcuts:

#Volume up
amixer set Master 5%+ && mplayer /home/fallon/.pop_sound.mp3

#Volume down
amixer set Master 5%- && mplayer /home/fallon/.pop_sound.mp3

#Mute
amixer set Master toggle && mplayer /home/fallon/.pop_sound.mp3

If any of the above shortcut commands are pasted into a terminal emulator (XFCE Terminal) they work flawlessly (although can have some lag before playing any sound). However when pressing my volume keys, only the first command works. The volume changes, but no popping noise is heard. (Obviously when pressing the mute, 50% of the time it shouldn't be heard. And when pressing the volume down key, it may also be quiet/muted)

How can I correct this in order to play .pop_sound.mp3 as well as change the volume when my volume keys are pressed?

Thanks for Reading this far, any suggestions are much appreciated smile

Offline

Board footer

Powered by FluxBB