17

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.

1
  • Which version of i3 are you using? It looks like sound support was implemented in version 2.2. Are running a version of i3status older than that?
    – mtw
    Commented Jun 23, 2013 at 23:37

2 Answers 2

10

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:

    muted

  • not muted:

    not-muted

7
  • How do you use FontAwesome for the icon but another font for the text? Commented May 21, 2014 at 16:19
  • I just load both fonts in .i3/config with font pango: M+ 1m, FontAwesome, 10
    – henrique
    Commented May 21, 2014 at 17:36
  • @henrique, can you please share your i3 config file? Thanks!
    – zalman
    Commented Nov 6, 2014 at 21:10
  • @zalman sure :) gist.github.com/hbpasti/39f2dd2d4dbd8fe04cbf
    – henrique
    Commented Nov 7, 2014 at 20:04
  • @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
    Commented Jan 4, 2015 at 21:27
9

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
}
1
  • 1
    I find it helpful to add a format_muted statement below format, like format_muted = "%volume"
    – Nick ODell
    Commented May 21, 2016 at 20:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .