You are not logged in.

#1 2012-04-29 02:03:41

prab
Member
From: Chennai
Registered: 2012-04-29
Posts: 14
Website

[SOLVED]Volume control bar doesn't appear upon XF86AudioRaiseVolume

Hi,
I got my laptop's volume button working by following the instructions here

https://wiki.archlinux.org/index.php/Xfce#ALSA

But upon increasing or decreasing or muting the volume using those buttons I don't see any control/progress bar. I am able to see them if I try to increase/decrease brightness. And yes, brightness adjustment worked out of the box in xfce, while I had to manually set the volume buttons to work. A screenshot is here which shows the control bar when adjusting brightness with those buttons.

Screenshot

The volume control bar does appear when I try to adjust volume in GNOME.

My laptop is:

Linux RAS 3.3.3-1-ARCH #1 SMP PREEMPT Mon Apr 23 09:33:32 UTC 2012 i686 Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz GenuineIntel GNU/Linux

The Xorg driver is xf86-video-intel

Last edited by prab (2012-04-29 04:06:54)

Offline

#2 2012-04-29 02:08:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: [SOLVED]Volume control bar doesn't appear upon XF86AudioRaiseVolume

I'm not sure what xfce uses for notifications, but you'd need to set that up separately.

You might be interested in volnoti from the AUR to get the desired result.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-04-29 02:13:53

prab
Member
From: Chennai
Registered: 2012-04-29
Posts: 14
Website

Re: [SOLVED]Volume control bar doesn't appear upon XF86AudioRaiseVolume

Trilby wrote:

I'm not sure what xfce uses for notifications, but you'd need to set that up separately.

You might be interested in volnoti from the AUR to get the desired result.

I'll try that and report back.

Update
Thank you! I used volnoti and made it working. Wrote four scripts. One is called getvol.sh which gives me the current volume value. Other three are raisevol.sh, lowervol.sh and mutevol.sh. I'm new to shell scripting so don't laugh at my code(suggesting optimizations and better coding styles are welcome anyways tongue). I am adding my code here, so that people(beginners) who need to solve the same problem don't reinvent the wheel.
I put all these scripts in my home folder->Documents->scripts->volnoti and then ran

chmod +x *

after getting into that directory in terminal. Afterwards I went to Menu->Settings->Keyboard->ApplicationShortcuts and added the three scripts for corresponding keys.

getvol.sh

#!/bin/bash

vol1=`amixer get Master | tail -1 | awk {'print $4'} | cut -b 2`
vol2=`amixer get Master | tail -1 | awk {'print $4'} | cut -b 3`
vol3=`amixer get Master | tail -1 | awk {'print $4'} | cut -b 4`
if [ $vol3 = "%" ]
then
	output=$vol1$vol2
elif [ $vol3 -eq 0 ]
then
	output=$vol1$vol2$vol3
else
	output=$vol1
fi
echo $output

raisevol.sh

#!/bin/bash

amixer set Master 5%+ > /dev/null
volnoti-show `$HOME/Documents/scripts/volnoti/getvol.sh`

lowervol.sh

#!/bin/bash

amixer set Master 5%- > /dev/null
volnoti-show `$HOME/Documents/scripts/volnoti/getvol.sh`

mutevol.sh

#!/bin/bash

amixer set Master toggle > /dev/null
volnoti-show -m

Last edited by prab (2012-04-29 04:05:44)

Offline

#4 2012-04-29 12:46:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: [SOLVED]Volume control bar doesn't appear upon XF86AudioRaiseVolume

prab,

You can find a more streamlined version for the scripts on the volnoti thread.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2012-04-29 14:58:08

prab
Member
From: Chennai
Registered: 2012-04-29
Posts: 14
Website

Re: [SOLVED]Volume control bar doesn't appear upon XF86AudioRaiseVolume

Thanks!
Will try that out.

Offline

Board footer

Powered by FluxBB