Generalizing a toolset blog home

Posted Thursday, 19-Nov-2026 by Ingo Karkat

As part of my major cleanup of the todotxt organization, I had to clone four more repositories, in addition to the two (for the todo.sh CLI and my published extensions) I already had. To prevent confusion where I am when juggling multiple tasks at once, I give each repo a dedicated icon. My shell setup automatically sets that whenever I enter a repo in the terminal. For todo.sh, I had taken the original project's icon, and had modified it (in Gimp) with a little red "x" for my extensions. But I didn't want to manually edit four more variants, so I naturally turned to scripting.

gene­rali­zation

I didn't need to start from scratch, as I had already built a tool icon-hosts that generates custom terminal icons for the systems I connect to. I just had to generalize it a bit into icon-variants, and then could generate the repo icons by overlaying individual (transparent black-and-white) graphics on top:

$ alias todotxt-variant='icon-variants --from ./todo.txt-cli.png --overlay-dir /home/inkarkat/Unixhome/icons/hosts/source'
$ todotxt-variant 60%center:wiki -- todo.txt-cli.wiki=
$ todotxt-variant center:webserver -- todotxt.github.io=
$ todotxt-variant 80%center:clipboard -- todo.txt=
$ todotxt-variant 70%center:organization -- todotxt=

todo.txt-cli icons

By the way, the image of the stitched icons has been generated by a related tool:

$ imageStitch --offset 20 \
todo.txt-cli.png \
todo.txt-cli-ex.png \
todo.txt-cli.wiki.png \
todotxt.github.io.png \
todo.txt.png \
todotxt.png
$ imageResize -s 50% photos/20261119\ todo.txt-cli\ icons.png

the original

The original icon-hosts is now a thin wrapper around icon-variants:

icon-hosts
ICONVARIANTS_WHAT='for each host' \
ICONVARIANTS_BASEICON_DESCRIPTION='a plain terminal background' \
exec icon-variants \
    --overlay-dir "${scriptDir}/../source" \
    --from ~/.local/share/icons/remote-terminal.256x256.png \
    "$@"

That command is used in my ~/.ssh/config, executed directly from Vim (via inline comments) when adding new hosts there:

ssh_config
# :lchdir ~/icons/hosts | let $PATH .= ':' . expand('~/icons/hosts/bin')
# private systems {{{1
# :!icon-hosts localvm -- localvm=
Host localvm
    User ...
    Hostname localhost
    Port 2222
    Icon localvm

# :!icon-hosts snake-biting-tail -- localhost=
Host localhost
    User ...
    Hostname localhost
    Port 22
    Icon localhost

# :!icon-hosts cloud -- cloud=
Host cloud
    [...]

# :!icon-hosts cloud -- vm1=vm1
Host vm1
    [...]

# :!icon-hosts cloud -- vm2=vm2
Host vm2
    [...]
    

Resulting in these icons that are used when I ssh into the corresponding host:
icon-hosts from ssh_config

This isn't just for fun (although I do like these self-designed icons very much, and they provide a smile on my face whenever I connect to one), it also helps prevent potentially grave errors when typing a command into the wrong terminal (e.g. when confusing the short-lived test server with the production one).

Ingo Karkat, 19-Nov-2026

ingo's blog is licensed under Attribution-ShareAlike 4.0 International

blog comments powered by Disqus