Is there a way to indicate if the sound is set to mute or not using i3status? I know how to show the volume (as explained in man i3status), but it doesn't distinguish between mute or just 0% volume.
Asked
Active
Viewed 2.0k times
18
Gilles 'SO- stop being evil'
- 807,993
- 194
- 1,674
- 2,175
student
- 17,875
- 31
- 103
- 169
-
Which version of i3 are you using? It looks like sound support was implemented in [version 2.2](http://code.stapelberg.de/git/i3status/diff/src/print_volume.c?id=eb46963d4c88a75f1ac336275daf3d0d72a904ba). Are running a version of i3status older than that? – mtw Jun 23 '13 at 23:37
2 Answers
11
Since version 2.8, there's a format_muted string (see the commit message and diff):
E.g.:
volume master {
format = " %volume"
format_muted = " %volume"
device = "default"
mixer = "Master"
mixer_idx = 0
}
Here, in format I used FontAwesome's icon fa-volume-up and in format_muted, fa-volume-off.
Screenshots:
muted:

not muted:

henrique
- 211
- 1
- 3
- 5
-
How do you use FontAwesome for the icon but another font for the text? – Laurence Gonsalves May 21 '14 at 16:19
-
I just load both fonts in `.i3/config` with `font pango: M+ 1m, FontAwesome, 10` – henrique May 21 '14 at 17:36
-
-
-
@henrique: The volume icons are just rendering as dots for me, but other icons are working fine (like the hdd icon). What could cause that to happen? – skeggse Jan 04 '15 at 21:27
-
@skeggse, pango uses FontAwesome as a fallback font for glyphs missing from the main font; probably the font you're using already assigned something to the corresponding glyph in FontAwesome (e.g. U+F026). Check https://wiki.archlinux.org/index.php/i3#Iconic_fonts_in_the_status_bar – henrique Jan 06 '15 at 16:46
-
@henrique I figured that was the case. I set it to use `M+ 1m`, which I figured would work because that's what's in your config. Maybe I don't actually have the font installed. – skeggse Jan 06 '15 at 16:50
10
I am using i3sttatus version 2.7 (2013-02-27) and alsa under 3.10.6-gentoo x86_64 with default colors for i3status. If I set the volume to mute via amixer or alsamixer, then the volume indicator will be yellow, whereas manually lowering the volume to 0% retains the default white coloring.
Here is the relevant part of /etc/i3status.conf:
volume master {
format = "♪:%volume"
device = "default"
mixer = "Master"
mixer_idx = 0
}
bghost
- 101
- 1
- 3
-
1I find it helpful to add a `format_muted` statement below `format`, like `format_muted = "%volume"` – Nick ODell May 21 '16 at 20:52