the unnamable:
		home

wm-dothis

A little utility program for the Window Maker window manager.

previous next navbar

What is wm-dothis?

wm-dothis is a Tcl/Tk-based program that provides a dialog box for inputting arbitrary shell commands or command arguments. It is made to look and act like the native dialog box provided by Window Maker. The difference is that it is keyboard-friendly; when the wm-dothis window is active, the text entry widget automatically gets the focus, and you can execute the command with the <Enter> key, or dismiss it with <Escape>. I look forward to the day when it will be unnecessary to have a separate program to do this.

Requirements

Window Maker window manager
Actually, you can use it with any window manager. But it's designed to look like a Window Maker module and might look out of place with other (inferior?) window managers.
Tcl/Tk 8.x
wm-dothis might work with earlier versions of Tcl/Tk, but it has only been tested with 8.0.

Installing

  1. Unpack the archive.
  2. Save 'ok.gif' to any convenient location.
  3. The 'wm-dothis' file has a few configuration variables (setting fonts, colors, and such) near the top, which you may wish to edit to make it look like your other windows; at least, you will probably need to edit the pathname for 'ok.gif'.
  4. Save 'wm-dothis in a directory in your $PATH, and make it executable.
  5. If you care about such details, edit your ~/GNUstep/Defaults/WMWindowAttributes file to make wm-dothis look just like the 'real' dialog box. I have:
               "wm-dothis.Wm-dothis" = {
                   NoResizebar = Yes;
                   NotClosable = Yes;
                   NotMiniaturizable = Yes;
                   KeepOnTop = Yes;
               };
    		

Usage

Although wm-dothis looks and acts as much like the regular WM dialog as I could make it (except for the Cancel button -- see the example below), the syntax for invoking it is substantially different.

Invocation
      wm-dothis PARAMS COMMANDLINE DEFAULT-TEXT
	    

All the arguments are optional.
PARAMS is a single-quoted list consisting of three items separated by spaces:

     TITLE LABEL OPTIONS
	    

TITLE and LABEL are strings. TITLE will appear near the top of the dialog box in a large typeface. LABEL appears just above the text-entry box in a normal typeface.

OPTIONS is not implemented yet.

COMMANDLINE is anything you want to execute. If you specify a command here, whatever is entered in the dialog box will be treated as additional arguments.

DEFAULT-TEXT will appear in the entry-box. You might use this, for example, to specify a default directory to get a file from.

Example

In my ~/GNUstep/Library/WindowMaker/menu file, I have:

     EXEC wm-dothis '"Acrobat Reader" \
       "Enter filename:"' "acroread" 
	    

Which produces the following dialog:

image of wm-dothis dialog
	      box

Basically, this acts just like the regular Window Maker dialog, with one exception. If you press cancel in the WM dialog, Acrobat Reader will still be executed -- it just won't be given any file to read. The wm-dothis cancel button cancels execution of the program. If you want to execute the program, but just not pass it a file name, you can hit the OK button while leaving the entry box blank.

Acknowledgements

Thanks to wARP (hope I spelled that right) for helping me figure out how to get the dialog box to take focus automatically on startup.

Bugs

  • It's a little slow.

Plans

I plan (but don't promise) to make a wm-dothis daemon which will run as long as Window Maker is running; in theory this will be able to pop up a dialog box much faster than the current version.

Download

wm-dothis.tar.gz [6 kb]

Window Maker is ...

a fast, easily-configurable, and great-looking window manager for X Windows.


home previous top contents next