This page looks best with JavaScript enabled

Show System Volume Level in Conky

 ·  ☕ 1 min read

Background

Showing the current (system) volume level from Conky is not generally available via a variable; however, it is possible with execpi and a system call.

Details

To show the current system volume level in conky you need to determine where/how your system volume is controlled (alsa, PulseAudio, etc.).

Alsa (alsamixer)

Vol: ${exec amixer -c 0 get Master | grep Mono: | cut -d " " -f6}

amixer is generally available in most linux distros by default and provides a quick, simple volume level. Credit goes to a stackexchange.com answer

PulseAudio (pactl)

Vol: ${execpi 500 pactl list sinks | grep "Volume: 0" | cut -d " " -f4 }

If you use PulseAudio, pactl can be used as above.

Other Methods

The logic should be the same if you use other sound libraries, simply change to the API for your desired library and feel free to contact us and we’ll update the post.

Share on

drad
WRITTEN BY
drad
Sr. Consultant