Custom Titlebars
This is how you can override the default titlebar proc:
- create a ~/.whim_config if you don't already have one. (Note: ~ is your home directory)
- use the following code or something like it to replace create.desktop.window.titlebar.widgets.
- be sure to at least create $path.titlebar.title, or else Whim will have internal errors
- remember that this proc is called for every desktop window that is created, so if you create images for the titlebar, try to create them outside of the create.desktop.window.titlebar.widgets proc.
This is in George's ~/.whim_config:
proc create.desktop.window.titlebar.widgets {appid path} {
create.titlebar.label $path.titlebar.title \
-textvariable ::windows($appid,title)
bindtags $path.titlebar.title [list $path.titlebar.title all]
#whimbutton $path.titlebar.shade -text ^ \
# -command [list shade.desktop.window $appid]
whimbutton $path.titlebar.close -text X \
-command [list close.desktop.window $appid]
#grid $path.titlebar.shade -row 0 -column 0 -sticky e
grid $path.titlebar.title -row 0 -column 1 -sticky we
grid $path.titlebar.close -row 0 -column 2 -sticky e
}Note: whimbutton is an abstraction for dealing with tile, and so is create.titlebar.label. You don't strictly need to use them.