tkgoodstuff:
an X Button Panel Utility

Version 4.0, Sep 14, 1995

TkGoodStuff for X windows is a utility panel (e.g., a button bar, a stack of bars, a stack of buttons, bars and stacks of bars, etc.---vertical or horizontal as you please). It is designed to be easily configured and modified in the user's ~/.tkgoodstuffrc file. The main envisioned use is as an always-on-top destop utility to serve the user's common needs for indicators and buttons. Some "clients" are included: analog/digital alarm clock, biff, WWW browser launcher, PPP (or SLIP) net status indicator and toggler, note taker/manager, calendar program alarm support, POP/IMAP mail fetching support. See below for some details about the clients.

I originally wrote this thing to make our home computer easier for my spouse to use for reading email from home; it's been slowly evolving. My hope is that others will contribute additional clients and send me suggestions. Thanks to those of you who already have sent me bug reports and suggestions.

Please let me know about any trouble you encounter, in the documentation and/or the program.

Table of Contents (this document)

Availability and system requirements:

Get the latest version at ftp://merv.philosophy.lsa.umich.edu/pub/

To run this utility, you need tcl7.4 and tk4.0 or later (these were released in July, 1995; find the latest tcl/tk distributions at ftp://ftp.smli.com/pub/tcl ). You should get tk/tcl anyway, to run exmh (a way-cool mh-based mailer), ical (a nice calendar program), tkman (great man page interface), etc. The comp.lang.tcl FAQ , and http://www.sco.com/Technology/tcl/Tcl.html will help you find more.

To use multicolored icons of the xpm variety, you need (in addition to libxpm, which you probably have already) a wish interpreter that understands pixmaps (the standard wish4.0 that comes with tk4.0 does not). The source for such an interpreter, which I call "xpmwish4.0" is in ftp://merv.philosophy.lsa.umich.edu/pub/ (I didn't write this code; the credits are included).

To run the Dialer (a graphical program to dial your modem, etc.) you need the expectk program, which means you must install the expect package after installing tcl and tk (but before deleting the sources!).

Advantages of TkGoodStuff
over Separate Clock, Biff, etc.

Features

Nifty Included Clients

Several commonly needed "client" items (buttons and indicators) are provided. These have a good deal of functionality, and are easily configured. See below for more on the particular clients.

AddButton

The "standard" user-defined buttons can be configured to show either icons or (multi-line) text labels or both at once, and global options can request no labels or no icons. For instance, a simple command in your ~/.tkgoodstuffrc adds a command button:
  AddButton DoNetscape -imagefile mozilla.xbm -text "Netscape" -unixcmd "netscape -ncols 50"
Among the unlimited possibilities here are use of the current X selection in your command. See the documentation on configuration files for more.

AddLabelBox

A label box contains text, e.g., to label a group of related buttons. A simple example:
  AddLabelBox NetUtils "Network Utilities"

The Popup Menu

The popup menu is invoked by clicking on the clock. It includes general functions relating to tkgoodstuff as well as sub-menus added by clients. Here's a screenshot:

SubStack and EndSubStack

These commands create vertical or horizontal stacks of elements (e.g., buttons and labels or other stacks), that can be nested indefinitely. If you're not careful, you might get something like the large example above (or worse). (A click on the examples will show you the .tkgoodstuffrc files that produced them).

The Background Task Scheduler

tkgoodstuff maintains a schedule of tasks to execute at regular intervals. The provided clients schedule tasks of checking the time, checking for new mail, checking network (PPP line) status, checking for calendar alarm items, and fetching new mail on a remote POP/IMAP server. It is quite straightforward to add more.

Included Clients

The "clients" (tcl/tk scripts that produce buttons or displays in the panel) that are included in this distribution are:

Installation:

  1. Unpack it in a directory somewhere (say, /tmp). One way (suppose you have the distribution in /tmp/):
        cd /tmp
        zcat tkgoodstuff4.0.tgz | tar xpf -
    
  2. cd to the source directory:
    cd /tmp/tkgoodstuff4.0
    
    Then type
    wish4.0 install.tcl
    
    A tk installation program (adapted from Sam Shen's tkinspect installer) will guide you through the very brief process. Probably the defaults selected will be ok, UNLESS you want xpm icons.

    If you have an extended wish interpreter (as opposed to wish4.0 that comes with tk4.0) you may want to use that as your "wish executable", especially if that interepreter understands xpm's or other sorts of image not handled by the stock wish4.0. See above for the ftp coordinates of a simple such extended wish, called xpmwish4.0. Another wish interpreter that handles xpm's is Tix4.0's tixwish. However, tixwish take greater system resources, messes up icon positioning and changes tkgoodstuff's appearance in other ways.

    Once you are finished, you can remove the source directory if you like (all the needed files will have been copied to a library directory.

  3. If you have a standard unix spool setup, simply running tkgoodstuff should give you working Clock and Biff clients (this setup is provided by the file system-tkgoodstuffrc. Many will want at least to change the Biff_mailer variable (I use Brent Welch's very nice exmh).
  4. Configure your own ~/.tkgoodstuffrc file.
  5. You probably will want to tell your window manager not to put a border, handles, or a title on tkgoodstuff, and perhaps to leave it always on top of other windows, and perhaps to make it "stick" in the same spot on the screen when you move about a virtual desktop. You may also want it not to be in the circulate list (the list of windows you go to by hitting alt-TAB or some key sequence). To do all of this in fvwm add the following SINGLE LINE (broken here for readability) to your .fvwmrc:
       Style "tkgoodstuff" StaysOnTop,NoTitle,NoHandles,Sticky,
                        WindowListSkip,CirculateSkip,BorderWidth 0
        
    Also, I suggest NOT using fvwm's auto-raise feature, which can cause havoc with tk popup menus (they get buried by auto raise, but they "grab" all events, so you can't get them back where you can click on them). If you think a tk application has "locked up" your X screen, auto-raise might be why. Comment it out in your .fvwmrc.

    If you use some other window manager, read its documentation---almost certainly you can achieve most of the same effects.

Documentation

The only documentation for tkgoodstuff is in these html pages, which are included in the distribution's "doc" subdirectory. From the "About tkgoodstuff (help)" window accessed from the popup menu, you can launch a web browser (by default, netscape) to read these pages (either your local copy or the latest copy on the net).


I hope you'll find this useful. I'd much appreciate any comments, bug reports, fixes, code-tidying, etc.

Sep 14, 1995. markcrim@umich.edu