Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Displaying Volume in Torsmo [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
beerisgoodmate
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2005
Posts: 129

PostPosted: Fri Jan 13, 2006 4:04 am    Post subject: Displaying Volume in Torsmo [solved] Reply with quote

I would like torsmo to display what my volume is currently set to...

Any idea on how to do this?

I am using aumix to change my volume levels using my laptops volume buttons... but I have alsamixer as well...

Thanks!


Last edited by beerisgoodmate on Fri Jan 13, 2006 5:20 am; edited 1 time in total
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Jan 13, 2006 4:14 am    Post subject: Reply with quote

I use this to get the volume with aumix into a script to show it into a FvwmButtons (I use Fvwm):
Code:

aumix -vq | sed -e 's/, P//'

I suggest you to do that into the command line, to see if the output is the desired one. That should work ok for master volume, if you want pcm volume then the sed string might be a bit different. Then integrate it into your torsmo config. I think that torsmo can manage bash scripts, cant it? But it has been so long since I last used it, so cant help you with that.
Back to top
View user's profile Send private message
beerisgoodmate
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2005
Posts: 129

PostPosted: Fri Jan 13, 2006 4:37 am    Post subject: Reply with quote

ok, so I get:

Code:
aumix -vq | sed -e 's/, P//'
vol 70, 70


Or
Quote:
aumix -wq | sed -e 's/, P//'
pcm 20, 20


because I use the pcm...

I never use sed so I don't know what to do with that... but the sed doesn't seam to do anything different to the command line output... I assume the sed is to format the output, but it doesn't seem to be doing anything...

I can run the script from torsmo and it works :) but I get
Code:
pcm 70, 70
I would rather just 70 etc...

Thanks!
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Jan 13, 2006 5:05 am    Post subject: Reply with quote

Ooops, sorry. FvwmScript has a function to take an arbitrary field of the output, so I just removed the tailing ", P" of the end and took that. To do the whole thing with sed try this one:
Code:

aumix -vq | sed -e 's/, P//' -e 's/vol \([0-9]*\)*, //'

Scary, I know, as all sed ifself. :) Hope this one works.
Back to top
View user's profile Send private message
beerisgoodmate
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2005
Posts: 129

PostPosted: Fri Jan 13, 2006 5:06 am    Post subject: Reply with quote

Thanks for the reply, But I found another solution:
Code:
 aumix -wq | awk '{ print $3}'


:D[/code][/quote]
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Jan 13, 2006 5:17 am    Post subject: Reply with quote

beerisgoodmate wrote:
Thanks for the reply, But I found another solution:
Code:
 aumix -wq | awk '{ print $3}'


:D[/code]
[/quote]
Ahhh! Some day I will have to learn a bit about awk, sed is really something bad to know about. :oops:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum