Many Tcl scripters know how to catch an exception, but not many know how to throw it. This wiki page shows how.
Monthly Archives: July 2011
Better Font and Color for tkcon in Linux Mint 11
The Problem
In Linux Mint, the default font and background color for tkcon is terrible. I want to change that to something easier to read.
The Solution
Here is my ~/.tkconrc, which fixes it by choosing a better font and background color:
set ::tkcon::COLOR(bg) ivory
set ::tkcon::OPT(font) "{Liberation Mono} 10"
Discussion
The default font in Linux Mint is terrible: it is hard to read and pixelated. I found the Liberation Mono font works best for me; your mileage may vary. Also, the default background of gray is somewhat dark and drepressing, therefore I changed it to ivory, which is an off-white color (at least on my old laptop).
Tcl: Does This File Belong to Me?
I often need to determine if a file belongs to me while my script is running in a shared environment. For that, I created a function called fileIsMine, read all about it here.
Update: I did not know that Tcl has a command called file owned, which does exactly what I want. Duh!