Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
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 Jun 23 '13 at 23:37

2 Answers 2

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
}
share|improve this answer

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

share|improve this answer
    
How do you use FontAwesome for the icon but another font for the text? –  Laurence Gonsalves May 21 at 16:19
    
I just load both fonts in .i3/config with font pango: M+ 1m, FontAwesome, 10 –  henrique May 21 at 17:36
    
@henrique, can you please share your i3 config file? Thanks! –  zalman Nov 6 at 21:10
    
@zalman sure :) gist.github.com/hbpasti/39f2dd2d4dbd8fe04cbf –  henrique Nov 7 at 20:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.