You are not logged in.

#1 2013-08-31 17:37:38

metal-0-1
Member
Registered: 2013-08-11
Posts: 8

[Awesome WM] notify current sound level with Naughty

If I run the following command in terminal, I get back my current sound level:

amixer get Master | tail -1 | awk '{print$4}'

I want to have a key binding that will make Naughty to display this value, but I dont know how I can assing this value to a variable in rc.lua. The following doesnt work

sound_level = awful.util.spawn_with_shell("amixer get Master | tail -1 | awk '{print$4}'")

It gives back just some weird numbers that have nothing to do with my sound level. However in terminal it works..

Last edited by metal-0-1 (2013-08-31 17:52:28)

Offline

#2 2013-08-31 17:49:10

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,548

Re: [Awesome WM] notify current sound level with Naughty

I just have it show up in my wibox using vicious widget.  If you use naughty, then you have to clear the messages.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2013-08-31 17:51:23

metal-0-1
Member
Registered: 2013-08-11
Posts: 8

Re: [Awesome WM] notify current sound level with Naughty

nomorewindows wrote:

I just have it show up in my wibox using vicious widget.  If you use naughty, then you have to clear the messages.

The point is that I DO NOT want to use vicious widgets to accomplish this task

Offline

#4 2013-08-31 18:04:45

kaszak696
Member
Registered: 2009-05-26
Posts: 543

Re: [Awesome WM] notify current sound level with Naughty

Wouldn't awful.util.pread() do the trick? Check the API documentation: http://awesome.naquadah.org/doc/api/mod … html#pread


'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard

Offline

Board footer

Powered by FluxBB