Firefox and dark GTK themes

Dark GTK themes can look very strange in firefox, since input widgets are likely to get transformed into dark pits with dark background colors and equally dark foreground fonts. Fortunately there is at least one solution that does not require fiddling around with GTK theme definitions.

The firefox plugin “Stylish” allows you to define your custom style overrides in css for your firefox browser.

https://addons.mozilla.org/en-US/firefox/addon/stylish/

To fix input widget color you would create a new style and copy something like the following into the style definition (sorry for the messy indentations caused by copy-pasting). Voilà, no more black holes in your browser sucking in your input text.

@-moz-document url-prefix(http), url-prefix(file) {
pre, input, textarea {
 color: black !important;
 background: white !important;
 border-left-color: gray !important;
 border-right-color: gray !important;
 border-top-color: gray !important;
 border-bottom-color: gray !important;
}
input:not([type="button"]):not([type="checkbox"])
:not([type="submit"]):not([type="reset"]), 
select {
 color: black !important;
 background: white !important;
 border-left-color: gray !important;
 border-right-color: gray !important;
 border-top-color: gray !important;
 border-bottom-color: gray !important;
}
}
Advertisements

Trying the Solarized Colorscheme

Usually, I prefer functionality over aesthetic appeal. Sometimes those two terms cannot be fully separated or can be reconciled in a unity of both. An example for this is the colorscheme applied to a user interface.

I decided to give the Solarized Colorscheme a try, it is still quite a hype and supposed to be immensely popular.

Solarized was created by a man with the passion of an artist and the precision of a scientist who put unbelievable energies into finding the best colors for a programmer’s text editor. The result is remarkable and can be found here:

http://ethanschoonover.com/solarized

( I wonder where he got the name from. Was it the Stanislaw Lem novel, the Tarkovsky film, one of its remakes or the old fashioned unix brand? My guess is the latter. Ironically the default colorscheme of the unix variant was a visual nightmare. )

The result is a light colorscheme and a dark one, if your workplace gets enough daylight, you are supposed to choose the light one, if you shun daylight or love to work in the night, the dark scheme is for you. I almost work exclusively with the dark scheme, in daytime and nighttime.

Solarized themes exist for the console, gtk, some window managers and many editors.

Arch Linux provides about 30 packages in AUR for the search term. You can solarize about anything from mc, emacs, vi and mutt up window manager decorations, consoles and text editors.  My own hacky ( not strictly canonical in terms of text color choices ) variant for SciTE, which I created because I could not find any for this editor fitting my purpose can be found on my github: https://github.com/marmoser/config/blob/master/.SciTEUser.properties

It covers most of the languages I use, but still leaves many looking very ugly due to missing style definitions.

My conclusions: For long working hours, a colorscheme with dark background and brighter text causes less eyestrain. I’m not switching back to dark text on bright backgrounds anytime soon. If UI colorschemes are something like a religion, Solarized manages to appeal even to agnostics.