You are not logged in.

#1 2015-06-14 05:22:27

dlrdlrdlr
Member
Registered: 2015-06-14
Posts: 10

[Solved] How to correctly show volume using i3bar, conky and alsa

I was using this line in the .conkyrr

V${exec amixer get Master -M | grep -oE "[[:digit:]]*%"}

however this suddenly started returning two valueslike so

10%
10%

which is causing a new line and breaking my i3 bar, how can I fix this or is there a better way of doing it?

I can provide the full conkyrc if needed.

Last edited by dlrdlrdlr (2015-06-14 05:30:10)

Offline

#2 2015-06-14 05:29:29

dlrdlrdlr
Member
Registered: 2015-06-14
Posts: 10

Re: [Solved] How to correctly show volume using i3bar, conky and alsa

Did a bit more research into grep and found it

including option -m1 in grep fixed it like so

V${exec amixer get Master -M | grep -oE -m1 "[[:digit:]]*%"}


Should I delete the post or leave this here for others googling.

Offline

#3 2015-06-14 12:05:57

ayekat
Member
Registered: 2011-01-17
Posts: 1,634

Re: [Solved] How to correctly show volume using i3bar, conky and alsa

Welcome to the Arch Linux forums!

dlrdlrdlr wrote:

Should I delete the post or leave this here for others googling.

No, it may be a useful resource for somebody who runs into the same problem, so deleting it would be selfish and destructive at best. Thanks for keeping it as it is. (see also https://wiki.archlinux.org/index.php/Fo … ay_street).


pkgs │ hacks │ cfg │ blag

Offline

Board footer

Powered by FluxBB