diff --git a/blog/change-colour-for-ls-to-work-with-bright-terminal-background.mdwn b/blog/change-colour-for-ls-to-work-with-bright-terminal-background.mdwn new file mode 100644 index 00000000..a5c81e3a --- /dev/null +++ b/blog/change-colour-for-ls-to-work-with-bright-terminal-background.mdwn @@ -0,0 +1,88 @@ +[[!meta title="How to change the colour of ls to work with bright terminal backgrounds"]] + +## Introduction + +I am using [rxvt-unicode](http://software.schmorp.de/pkg/rxvt-unicode.html) +as my terminal and prefer to use a bright background due to better +readability in the sun. + +I have tried various colour themes +(including +[solarized](http://ethanschoonover.com/solarized) and +[solarized-light](https://github.com/yangzetian/xresources-color-solarized-light), +but was never satisfied, because of changes +they make to existing colour configurations for applications +like mutt, alot or irssi. + +I am essentially using black as the foreground colour and +LightYellow2 as the background colour at the moment (which I inherit +from some very old xterm + [[!fvwm]]2 settings). + +## Motivation + +The problem with my current setup is that symbolic links are +show in **cyan** by ***ls*** on my system and thus are pretty much +unreadable, as you can see: + +[[!img urxvt-before.png alt="urxvt with unreadable cyan colour"]] + +## The solution + +As the problem mainly arises by the use of ls, I initially thought +about modifying the **LS_COLORS** variable. However, as I frequently +login to servers that are variable does not effect the colour output +on the servers (and modifying AcceptEnv on all servers is also not +realistic). + +As I do not want to have cyan output on my LightYellow2 background +at all, I thought about changing the colour cyan to black. + +I found a nice colour table on [[!gentoowiki Rxvt-unicode#Color_theme]], +with description of colour number to name: + + !black + *color0: #251f1f + *color8: #5e5e5e + !red + *color1: #eb4509 + *color9: #eb4509 + !green + *color2: #94e76b + *color10: #95e76b + !yellow + *color3: #ffac18 + *color11: #ffac18 + !blue + *color4: #46aede + *color12: #46aede + !magenta + *color5: #e32c57 + *color13: #e32c57 + !cyan + *color6: #d6dbac + *color14: #d6dbac + !white + *color7: #efefef + *color15: #efefef + + +## The result + +So in the end, only the following entries in .Xresources are +required to make cyan symbolic links readable by changing +cyan to black: + + URxvt.background: LightYellow2 + URxvt.foreground: black + URxvt.color6: black + URxvt.color14: black + +[[!img urxvt-after.png alt="urxvt with cyan changed to black"]] + +## SEE ALSO + +* [Terminal Colours](http://ciembor.github.io/4bit/) +* [[!archwiki X_resources]] +* [[!archwiki Rxvt-unicode]] + +[[!tag terminal unix urxvt]] diff --git a/blog/change-colour-for-ls-to-work-with-bright-terminal-background/urxvt-after.png b/blog/change-colour-for-ls-to-work-with-bright-terminal-background/urxvt-after.png new file mode 100644 index 00000000..189aabb7 Binary files /dev/null and b/blog/change-colour-for-ls-to-work-with-bright-terminal-background/urxvt-after.png differ diff --git a/blog/change-colour-for-ls-to-work-with-bright-terminal-background/urxvt-before.png b/blog/change-colour-for-ls-to-work-with-bright-terminal-background/urxvt-before.png new file mode 100644 index 00000000..be3bf18b Binary files /dev/null and b/blog/change-colour-for-ls-to-work-with-bright-terminal-background/urxvt-before.png differ diff --git a/shortcuts.mdwn b/shortcuts.mdwn index 03de2aa9..17022b67 100644 --- a/shortcuts.mdwn +++ b/shortcuts.mdwn @@ -43,3 +43,6 @@ * [[!shortcut name=munin desc="Munin" url="http://munin-monitoring.org/"]] * [[!shortcut name=collectd desc="Collectd" url="https://collectd.org/"]] * [[!shortcut name=ganglia desc="Ganglia" url="http://ganglia.info/"]] +* [[!shortcut name=fvwm desc="fvwm" url="http://www.fvwm.org/"]] +* [[!shortcut name=archwiki desc="%s in Arch Linux Wiki" url="https://wiki.archlinux.org/index.php/%s"]] +* [[!shortcut name=gentoowiki desc="%s in Gentoo Wiki" url="https://wiki.gentoo.org/wiki/%s"]]