|
wm-dothisA little utility program for the Window Maker window manager. |
|
|
|
|
|
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
Installing
UsageAlthough 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.
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. ExampleIn my ~/GNUstep/Library/WindowMaker/menu file, I have:
EXEC wm-dothis '"Acrobat Reader" \
"Enter filename:"' "acroread"
Which produces the following dialog:
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. AcknowledgementsThanks 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
PlansI 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. DownloadWindow Maker is ...a fast, easily-configurable, and great-looking window manager for X Windows. Visit the Window Maker home page . |
|
|
|
|
|
Matt Gushee
Last modified: Sun Nov 8 21:14:53 JST 1998 |