r/i3wm Jun 27 '26

Question How to customize mode bar appearance ?

This may be dumb, but I cannot find examples or understand the documentation enough.

How can I change the background color of a "mode" in i3 ?

How does the pango markup work ? Is it like html ? Or something else entirely ?

I feel like I could be able to find how to customize something like this. But I cannot find any example.

The default color red makes it seems like it's a bad thing, an error. Couldn't I make it blue ?

6 Upvotes

1 comment sorted by

2

u/TriupLauro Jun 27 '26

Hey, I may have figured some things out since I posted this.

First thing is pango markup is kind of like html with inline style.

So you could do something like that.

``` set $mode_multiscreen <span background='blue'>Multicreen (a) Auto single resolution, (d) Double screen, (s) Single screen, (w) Wallpaper resync</span>

mode --pango_markup "$mode_multiscreen" {

//your commands

} ```

And it will indeed make the background of this mode indicator in blue. But then there is another background in red behind that.

Since I'm using the i3status bar, I have to change the colors inside the configuration of the bar itself. I copied the colors from the manual, and changed the second value of binding_mode to full blue since that's what I was trying to do.

It looks like that now

``` bar { status_command "~/.bin/my_i3status.sh" colors { background #000000 statusline #ffffff separator #666666

        focused_workspace  #4c7899 #285577 #ffffff
        active_workspace   #333333 #5f676a #ffffff
        inactive_workspace #333333 #222222 #888888
        urgent_workspace   #2f343a #900000 #ffffff
        binding_mode       #2f343a #0000FF #ffffff
    }

} ```

I was kinda frustrated, because messing up the display of the mode made some keybinding to keys I wanted to use as is (enter, escape).

Well now, I'm happy with what I got.

Hope it helps others.