What's the common way to indicate focus on a window?

Something I've been noticing, sometimes when I switch workspaces or just forget what I'm doing, there's not a great indication of which window currently has my focus.

For the terminal, the cursor may be full and/or blinking but that's not the greatest and most obvious visual cue.

What I'm curious of, is how are you usinig i3 to indicate which window has focus? I am using compton, so maybe transparency? E.g. focus window has no transparency, all other windows are 50% transparent. Or perhaps a border on the focused window?

Thank you in advance!

Posted Apr 5, 2017, 10:46 AM UTC

318
Trollw00t•

It's described in the i3 docs as "client.focused"

BTW: the <indicator> is one side of the client border, where you can set a different color. This color shows on which side on the focused window the next window will be opened (it'll show you horizontal or vertical tiling pretty easy)

3
thomas_stringerOPArch•

Perfect, this looks like a great approach to bordering active and inactive windows appropriately. Thanks!

2
Trollw00t•

No problemo mi amigo. And don't forget the <indicator>! Since I found out, it makes setting up those terminal multiplexing workspaces quick and easy.

1
thomas_stringerOPArch•

I should have mentioned this before, but I'm using i3-gaps. It looks like the client.focused. It's because I have this set:

for_window [class="^.*"] border pixel 0

If I remove that, it works. Is there any way to remove the title bar, but keep the border I suppose? I like this with border pixel 0 but it doesn't do much for me if I want to have an inactive border set to indicate focus. :-(

1
Trollw00t•

Just set another value than 0 in your example. 0 is the thickness of the border. :-)

e.g. i use this:

for_window [class="^.*"] border pixel 5
1
EngezeesUbuntu i3-gaps polybar compton•

When using compton compositior You can use :

inactive-dim = 0.3;

To dim inactive windows.

3
thomas_stringerOPArch•

Awesome, I'll give this a try! Where would this setting go? Doesn't look like it'd be in i3 config.

1
EngezeesUbuntu i3-gaps polybar compton•

No.

It should go to compton.conf (please check the compton page : https://github.com/chjj/compton ).

But the run of compton compositor can go into the i3 config (f.ex) :

exec --no-startup-id "compton -b --config ~/.config/compton/compton.conf"

2
urmrgayyaimru•

default settings, title bar of window has blue, inactives have grey

2
thomas_stringerOPArch•
1
urmrgayyaimru•

Ah seen. But... I think title bars would be the common way... :p

3
thomas_stringerOPArch•

Fair enough, thanks! :-)

1
thenextguyArch•

URxvt.fading: 20

Fade the text by the given percentage when focus is lost.

1
thomas_stringerOPArch•

That's a good recommendation, but I'm using termite. Thanks anyways!!

1
thenextguyArch•

Yeah, especially if you're already using compton which has a similar feature (IIRC). But putting it out there for others (like me) who aren't using it.

1
love_i3•

This is cool! I'm not using a compositor either.

1