You are not logged in.

#1 2017-06-16 15:37:25

ethanabrooks
Member
Registered: 2017-06-16
Posts: 9

[SOLVED] Change terminal background when in focus by tiling manager

I am fairly open to different terminals / windows tiling managers. However I would like a combination that allows me to do the following:
When a terminal is highlighted, I would like the background color of the terminal to change.
To clarify, i3, can change the border of the highlighted window to change, but I want the actual field on which the terminal renders text to change.

Thank you for any suggestions.

Last edited by ethanabrooks (2017-06-17 17:57:10)

Offline

#2 2017-06-16 15:40:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [SOLVED] Change terminal background when in focus by tiling manager

Which terminal?  This is entirely up to the terminal, not the window manager*.  Urxvt has options for this.

*edit: depending on ones definition of "window manager", some window managers could do this.  More specifically compositors, not window managers, can fade unfocused windows.  Some WMs are bundled with a compositor, i3 is not but you can run i3 and a compositor if you want.  Just the same, what you want really should be handled client-side (in the terminal settings).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-06-17 15:05:41

ethanabrooks
Member
Registered: 2017-06-16
Posts: 9

Re: [SOLVED] Change terminal background when in focus by tiling manager

Well, I currently use termite, so I would happy to stick with that one if possible. I also use i3, but there doesn't seem to be a way to do what I'm describing in i3. I downloaded Urxvt and played a little with the config, but I didn't see anything in the documentation or the example config file that I downloaded that related to whether or not the terminal was in focus by the tiling manager. Could you provide a little more detail?

Offline

#4 2017-06-17 15:15:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [SOLVED] Change terminal background when in focus by tiling manager

Tiling is irrelevant.  Focus is focus.  In urxvt you're looking for the 'fade' options.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-06-17 16:09:30

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] Change terminal background when in focus by tiling manager

If you want to stick with termite, as Trilby already mentioned, a compositor should be able to help you out. Give compton a try.

Offline

#6 2017-06-17 17:09:43

ethanabrooks
Member
Registered: 2017-06-16
Posts: 9

Re: [SOLVED] Change terminal background when in focus by tiling manager

So compton gets me pretty close to what I am looking for, specifically using the `-i (inactive-opacity)` option. This option makes inactive windows partially transparent, as determined by command line argument. Is it possible, rather than giving inactive windows partial transparency, to give those windows a different, or tinted background color? Thanks for all your help.

Offline

#7 2017-06-17 17:28:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [SOLVED] Change terminal background when in focus by tiling manager

You probably want the inactive-dim option, but I've never used compton.

But other than that, there is very little a WM or compositor can do.  The client controls what is painted in the window.  The winow manager has no control at all.  The compositor can modify the content a bit by compositing it with some other graphic mask, but it is limited to blending two graphics buffers.  Neither the window manager nor compositor knows anything about the content of the window.  The client (e.g. the terminal) does.  So a terminal can change it's background color and only the background color (not affecting the text) when inactive.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2017-06-17 17:55:02

ethanabrooks
Member
Registered: 2017-06-16
Posts: 9

Re: [SOLVED] Change terminal background when in focus by tiling manager

inactive-dim is perfect. Thanks for your help.

Offline

#9 2017-06-17 19:01:02

seth
Member
Registered: 2012-09-03
Posts: 51,270

Re: [SOLVED] Change terminal background when in focus by tiling manager

Addendum

Is it possible [...] to give those windows a different, or tinted background color?

for urxvt a perl script should be possible to alter colors or at least color reversion depending on on_focus_in/on_focus_out hoooks and the rendition bits, see http://pod.tst.eu/http://cvs.schmorp.de … c/urxvt.pm (double URL for nice markup ;-)

Offline

#10 2017-06-20 15:53:58

ethanabrooks
Member
Registered: 2017-06-16
Posts: 9

Re: [SOLVED] Change terminal background when in focus by tiling manager

Got it. Thanks!

Offline

Board footer

Powered by FluxBB