The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

i3status, hide module if down

asked 2015-05-08 17:52:59 +0000

Jose Luis gravatar image

I would like to hide a module if is down (or if not a mount point for disks), for example, if wireless is down I have this:

1.8 GB  Use: 88.1% | W: down | E: (1000 Mbit/s)

I can set format_down to empty string, but in that case, the output is not so nice:

1.8 GB  Use: 88.1% |  | E: (1000 Mbit/s)

Ideally I would like to have this

1.8 GB  Use: 88.1% | E: (1000 Mbit/s)

Is it possible?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-05-09 00:15:52 +0000

Airblader gravatar image

Force the output to be json. It will use a newer protocol version in which empty blocks are ignored.

The output format can be set in the general section.

edit flag offensive delete link more


That's a good one!

i3convert gravatar imagei3convert ( 2015-05-09 15:33:40 +0000 )edit

answered 2015-05-08 19:04:13 +0000

i3convert gravatar image

The simplest solution is to create a wrapper (say, /home/your-name/bin/ that replaces | | with |, i.e., removes the unnecessary field:

i3status | sed 's/|  |/|/g'

Now in the config file use instead of i3status.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-05-08 17:52:59 +0000

Seen: 180 times

Last updated: May 09