By a lucky coincidence, I discovered that PySolFC comes with a Clearlooks pixmap theme nicer than the built-in one I was using. Unfortunately, there seemed to be no documentation on how to install your own Ttk themes beyond forum posts saying “run the build scripts”. Geeking time!
After a little puttering around and a bit of uncertain code-diving (I don’t code TCL.), I figured out that all you have to do is grab your theme’s top-level directory (the one with pkgIndex.tcl
) and put it somewhere TCL’s library loader can find it.
Here’s what I used on Gentoo Linux: (Roughly. I actually use zsh.)
mkdir -p ~/.local/share/tkthemes cp -r /usr/share/games/pysolfc/themes/clearlooks ~/.local/share/tkthemes/ echo "export TCLLIBPATH=~/.local/share/tkthemes" >> ~/.bashrc vim ~/.Xdefaults
Keep in mind that if you don’t either use startx
to launch your X sessions or launch your Tk applications from a terminal, you’ll need to set TCLLIBPATH
somewhere like ~/.kde4/env/set_ttk_theme.sh
or ~/.xsessionrc
instead.
UPDATE: In some Tk applications, you can force the menu bar to match the color of the Clearlooks Ttk theme by setting *background: #efebe7
in your ~/.Xresources
file.
Installing a new Ttk/Tile theme by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Pingback: Making Tk applications a bit less ugly | Stephan Sokolow's Blog
Pingback: Tweaking Motif to make DDD stick out a little less | Stephan Sokolow's Blog