Installing a new Ttk/Tile theme

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/ 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.

CC BY-SA 4.0 Installing a new Ttk/Tile theme by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

2 Responses to Installing a new Ttk/Tile theme

  1. Pingback: Making Tk applications a bit less ugly | Stephan Sokolow's Blog

  2. Pingback: Tweaking Motif to make DDD stick out a little less | Stephan Sokolow's Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.

All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.