Problem with the Volume Panel plugin
Andrew Robinson
andrew.rw.robinson at gmail.com
Tue Feb 5 17:39:00 CET 2008
I just wrote bash scripts and tied them using xfce's keyboard support (using
xmodmap to define names for the keys).
Example mute and louder:
~/.Xmodmap
keycode 160 = XF86AudioMute
~/bin/mute
#!/bin/bash
if [ -z "$MASTER_AUDIO" -a -f ~/.bash_env ]; then
. .bash_env
fi
amixer set $MASTER_AUDIO toggle
display-volume
exit 0
~/.bash_env
export MASTER_AUDIO="Front"
export ALT_AUDIO="PCM Master"
Here is my louder script:
#!/bin/bash
if [ "$1" != "" ] ; then
VOLADJ=${1}+
else
VOLADJ="1+"
fi
if [ -z "$MASTER_AUDIO" -a -f ~/.bash_env ]; then
. .bash_env
fi
if amixer get $MASTER_AUDIO | grep "\[off\]" > /dev/null ; then
amixer set $MASTER_AUDIO toggle
fi
amixer set $MASTER_AUDIO ${VOLADJ}
amixer set $MASTER_AUDIO ${VOLADJ}
if [ -n "$ALT_AUDIO" ]; then
for i in $ALT_AUDIO; do
amixer set $i 100%
done
fi
display-volume
exit 0
~/bin/display-volume
#!/bin/sh
if ! pgrep osdsh > /dev/null ; then
~/bin/start-osd
fi
if amixer get $MASTER_AUDIO | grep "\[off\]" > /dev/null ; then
osdctl -s "MUTE ON"
else
NUM1=`amixer get $MASTER_AUDIO | grep "%" | head -n1 | perl -ne '/(\d+)%/;
print $1;'`
NUM2=`amixer get $MASTER_AUDIO | grep "%" | tail -n1 | perl -ne '/(\d+)%/;
print $1;'`
AVG=`expr \( $NUM1 + $NUM2 \) / 2`
osdctl -b "Volume: $AVG%",$AVG
fi
~/bin/start-osd
#!/bin/sh
FONT="-*-times-*-r-*-*-*-240-*-*-*-*-*-*"
osdsh -f "$FONT" -d 3 -o 2 -p 1 -a 9
-Andrew
On Feb 5, 2008 8:15 AM, Matthias Sauppe <
matthias.sauppe at s2004.tu-chemnitz.de> wrote:
> Hey folks,
>
> I'm having a problem with the XFCE Volume panel plugin.
>
> I've been using XFCE a quite long time by now and I recently upgraded
> from XFCE 4.0 to 4.4. In the new (4.4) version, the XFCE volume control
> panel plugin seems to capture my keyboard multimedia keys. I don't want
> that - can I turn this feature off? In XFCE Settings --> Keyboard, I
> already removed my multimedia keys shortcuts.
>
> Background to my question:
> My soundcard is an Audigy 2 Platinum where the headphone jack can be
> turned on/off independently of the external amplifier. So I wrote a C
> program that manages (among others) my Mute key. If I pressed the Mute
> key, my program cycled through "Speaker", "Headphone" and "Mute"
> settings, and I was pretty happy with it. My program gets the
> keypresses using the evdev devices and it sets the mixer volume using
> the "amixer" command line tool.
> However, this program still works - but only if the volume control
> plugin wasn't loaded. After loading it, my Mute cycle doesn't work
> anymore, because both my program AND the volume control plugin do
> actually handle the keypresses. In fact, my program also handles the
> volume keys, but this is not that important. The Mute key is more
> critical for me.
>
> Does anyone have an idea?
>
> Thanks
> Matthias
> _______________________________________________
> Xfce mailing list
> Xfce at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce
> http://www.xfce.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce/attachments/20080205/51cda7c0/attachment.html>
More information about the Xfce
mailing list