blog · git · desktop · images · contact


One solution to “the summer problem”

2020-06-13

When you browse through my desktop screenshots, you see a lot of dark terminal color schemes. Occasionally, there is a screenshot showing a bright terminal. The reason being that I’d actually like to take my laptop outside and sit there for a while. That is totally impossible with a dark scheme.

I can only speculate about the reasons. Reflections are part of it. Even with a non-shiny physical screen, a black monitor makes it much more likely to see some kind of reflection. Maybe even just parts of your bright shirt. This won’t happen (as much) with a bright white screen.

The topic is much more complex, though, and I haven’t researched it in detail.

Either way, from time to time, I try to switch to a bright terminal color scheme. And fail miserably every time.

I think there are two main reasons:

  1. With a black background, you can use bright foreground colors. Different elements on the screen can have different bright foreground colors depending on their meaning. This just doesn’t work with a bright background – try using yellow on white. At any rate, you have to use a “dark yellow”, which isn’t really yellow and looks terrible.
  2. Many terminal applications expect a dark terminal or simply hard code such colors.

Just compare these two windows (ignore the $ in the prompt):

bitmap fonts

The dark one has a much better readability. The situation can be improved by using a larger font or a bolder font (probably because “bright areas glow”), but since I can’t sacrifice any more screen estate, the only option is a vector font with anti aliasing:

vector fonts

That is indeed a bit better. But, I’m sorry, my screen is old, my eyes aren’t that good – anti aliased fonts just look horrible to me. Looking at them makes me feel like my eyes are out of focus and I have to squint, because everything looks blurry to me. I tried for an entire week recently, I can’t get used to it. This situation will probably change in the future when screens with higher pixel densities are available to me, but I’m not quite there yet.

And even after having used a bright scheme for three weeks now, it still feels like it’s screaming at me. It’s overly bright. It’s not comfortable. I don’t want to use that all the time.

What to do instead?

Okay, my goal is to work in brighter environments – for a while. Not an entire day. Not even every day. Just now and then. So, why not switch colors temporarily?

It’s theoretically possible to switch the color scheme of a terminal emulator (I even implemented full-blown profiles in xiate as an experiment), but, yeah, that doesn’t solve the problem. I don’t want to type set background=light in every currently open Vim. I don’t even want to press the hot key for changing the terminal profile in every single open terminal. All that is not feasible.

So … I have to do it globally. Invert the entire X screen.

This can be done by changing X’s gamma ramps, for example using this program:

https://github.com/zoltanp/xrandr-invert-colors

This must be the only program managing gamma ramps, so be sure to turn off tools like redshift.

So, I added a hot key for xrandr-invert-colors. Pressing it once makes the screen bright. Pressing it again returns everything back to normal.

The terminal window from above, the dark one, will now look like this:

inverted window

As a more complete example, that’s an entire screen:

inverted screen

It has its drawbacks. The 3D effect on my bars looks inverted, too. The terminal is bright, but some colors are “wrong” – red isn’t red. I think it’s because of arguments like those that I never even thought about this approach in the past. I want my UI to be good looking and consistent, so, clearly, just inverting the entire screen can’t be a solution, can it?

Yes, it can. It doesn’t matter. It’s not perfect but it’s good enough. I can ignore the broken 3D effect for a while. I can ignore all the downsides of bright color schemes in general – for a while. To be honest, working in bright daylight on the balcony isn’t that comfortable anyway, I tend to squint a lot, I only focus on a small area of the screen, the chair is bad, the table is bad – but the sun is nice.

Then on the upside: The entire screen gets inverted, this includes tools like dmenu, all kinds of non-customizable programs, web sites, you name it. And if things don’t work out for some programs, because they’re bright to begin with, I can restore the original colors with just one key press.

I’ve used this approach a couple of times now and it works much better than using a bright color scheme all the time. I think I can finally consider “the summer problem” to be solved. It has been bothering me since I got my first laptop.

Comments?