As Terminator and iTerm2 does, could be a nice feautre that Terminix changes the fg and/or bg color of the unfocused terminals.
Currently only title in the terminal header changes it color.
I fooled around a bit with this but my current implementation has many issues that would need to be addressed. If you are building from source, set the DIM_TERMINAL_NO_FOCUS to true in constants.d to try it out.
I made the change you suggested, but only works with the Light theme.
Like I said it has issues :)
I'm not sure my current poc approach is the way to go either, I believe
Terminator does it by actually changing the font colors.
On 18 Apr 2016 4:16 p.m., "Eduardo Bellido Bellido" <
[email protected]> wrote:
I made the change you suggested, but only works with the Light theme.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/gnunn1/terminix/issues/263#issuecomment-211603239
Yeah, you said it!
The Terminator way to do this seems a good way :wink:
I think that your guess is correct... http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk/view/head:/terminatorlib/terminal.py#L1190
Thanks @egmontkob that is very helpful, I think I've found a good way to do this. My original attempt used Cairo to draw an Alpha rectangle, after doing some research I saw that using a Cairo compositing operator would likely produce better results. I've put in a new implementation and it seems to work pretty well with both light and dark themes.
Since it is a post-processor at the draw level it avoids the issues with setting the VTE palette colors that you noted like dealing with colors set via escape codes, etc.
@edubxb If you have some time, can you give it another try and let me know what you think. One thing to note, like Terminator there will be a scaling factor from 0 to 1 which controls the alpha level. There is too much variance in color across dark and light to use a hard-coded value so depending on your theme you may need to adjust it. To do that, in terminal.d:1580 you will see this line:
cr.setSourceRgba(bg.red, bg.green, bg.blue, 0.2);
The scaling factor is 0.2, try setting different values and see if you can achieve a good result with the theme you are using. If you can, we are probably good to go in terms of making this available, I'l just need to add a preference and slider to the preferences dialog to control the factor.
I suppose I should mention that the scaling factor is a value from 0 to 1 where 0 is completely transparent and 1 is completely opaque. So .5 would be 50% alpha.
Just compiled the master branch and changed the value to 0.5, but nothing happens, not sure if I'm doing something wrong...
If you did a checkout, did you remember to change that DIM_TERMINAL... in constants.d back to true?
Now I'm sure that I did something wrong, thanks!
Look's good, now the only missing thing is to add the slider to change the alpha value as you suggested.
Looks nice indeed!
It seems to me that it shifts colors towards white in inactive panes. I'm wondering if it'd be better to shift them towards black, or mid-gray, or the terminal's background color, or even have a config option to choose among these. Could be worth experimenting a bit...
(Update: Okay, I've found it, it shifts the color towards the Gtk+ theme's default background. Maybe the terminal's background color is a better idea, dunno, maybe not.)
Is this setting something that will be part of a color scheme?
@phw @egmontkob Right now it uses the theme color for INSENSITIVE which for the VTE might be the same as the theme background. I tried it with the VTE background as well but it didn't seem to look as good.
I'm debating about allowing to set the color used with the profile color scheme and putting the factor slider there as well. This would allow people to really tune it well. The con of course is it would need to be tuned for each color scheme.
The option to dim the unfocused terminals would remain global.
Does that make sense to you guys, I'm quite open to suggestions.
So I'm making progress on this, anyone have any thoughts on how to make this UI suck less?

I think I'm going to revert the UI and simply add an Advanced menu button with a popover that has the highlight, cursor and dim color options. The button would be positioned next to the Use theme colors... checkbox and tied to it for sensitivity.
This should look much less busy and tuck these lesser used options away.
Yes, sounds cleaner to me, too
I've checked in an initial implementation of this, I definitely need to do more testing though before closing this issue, particularly around the color tab of the profile editor as I'm not sure it's completely solid at this point.
As a bonus, added support for setting the cursor and highlight color with a new Advanced button.
Here's the new dialog, much cleaner.

Included in today's release, closing.
Most helpful comment
Thanks @egmontkob that is very helpful, I think I've found a good way to do this. My original attempt used Cairo to draw an Alpha rectangle, after doing some research I saw that using a Cairo compositing operator would likely produce better results. I've put in a new implementation and it seems to work pretty well with both light and dark themes.
Since it is a post-processor at the draw level it avoids the issues with setting the VTE palette colors that you noted like dealing with colors set via escape codes, etc.
@edubxb If you have some time, can you give it another try and let me know what you think. One thing to note, like Terminator there will be a scaling factor from 0 to 1 which controls the alpha level. There is too much variance in color across dark and light to use a hard-coded value so depending on your theme you may need to adjust it. To do that, in terminal.d:1580 you will see this line:
The scaling factor is 0.2, try setting different values and see if you can achieve a good result with the theme you are using. If you can, we are probably good to go in terms of making this available, I'l just need to add a preference and slider to the preferences dialog to control the factor.