DWM status bar

cpm@

Moderator
Moderator
Developer
Hi,

How to get the volume in the DWM status bar to display as a percentage?


Thanks
 
What are you using to feed dwm's status bar? (i.e. conky or a script or ?)

And by "volume" what do you mean? Mixer volume? An application (like musicpd / mpd) volume?

If Conky & mpd is your environment, I don't have an answer for you. I used to run my status bar via a Python script I developed. Percentage based reporting is easy with Python, or you could do a volume bar graph (mine looked like:

Code:
Like Suicide - Soundgarden (paused) [::::::    ] [0.00 0.05 0.01] 12:09 PM Wednesday August 09

Given I'm using very little of conky, perhaps I might go back to the python script although conky itself seems to use very little system resource and is trouble free where the Python mpd client had issues from time to time.
 
Using mixer (8) command or a equivalent NetBSD command like mixerctl (1).

Code:
xsetroot -name "volume: $(/usr/bin/mixerctl -n outputs.master | /usr/bin/sed 's/^[0-9]*,//g')

Thanks for your time
 
Solved!

Code:
xsetroot -name "vol/pcm: $( (/usr/sbin/mixer -s vol 2> /dev/null || echo - ) | cut -d ':' -f 2 )/$( (/usr/sbin/mixer -s pcm 2> /dev/null || echo - ) | cut -d ':' -f 2 )"

Thanks to vermaden post
 
Back
Top