On Sun, Sep 01, 2002 at 10:29:40AM -0400, Tom Allison wrote:
> I'm trying to add my own command to the Window Maker WM.
>
> What I'm tyring to do is add the ability to run a single command
> line from the F2 key. This is simeilar to the functionality in
> KDE of the F2 button.
>
> Someone has recommended
>
> "Run..." SHORTCUT F2 SHEXEC %a(Run,Type command to run: )
>
> The only problem is that I really don't know where to put it.
>
>
> help?
>
> Personally, I think it would be pretty neat to put together
> something in the docs of the WindowMaker. (I really hope I didn't
> miss seeing this file if it does exist, I'll feel really stupid.)
You want to add the command to ~/GNUstep/Defaults/WMRootMenu. You can
edit the file with any text editor or /usr/bin/WPrefs.
The following is the WMRootMenu that I use. It is based heavily on an
example Karsten M. Self published to the list several months ago.
cat ~/GNUstep/Defaults/WMRootMenu
(
Commands,
(Run..., SHORTCUT, "Mod1+F2", EXEC, "%a(Run, Command to run:)"),
(Terminal, SHORTCUT, "Shift+Mod1+t", EXEC, rxvt),
(
Rootshell,
SHORTCUT,
"Shift+Mod1+r",
EXEC,
"rxvt -bg grey20 -fg wheat -exec sudo su -"
),
(Galeon, SHORTCUT, "Shift+Mod1+n", EXEC, galeon),
(Jpilot, EXEC, jpilot),
(Gimp, EXEC, gimp),
(OpenOffice, EXEC, "/usr/bin/ooffice"),
(gtop, EXEC, gtop),
(
Applications,
(Bibletime, EXEC, bibletime),
(Dillo, EXEC, dillo),
(Galeon, SHORTCUT, "Shift+Mod1+n", EXEC, galeon),
(Lyx, EXEC, lyx),
(Mozilla, EXEC, mozilla),
(Mutt, EXEC, "rxvt -bg black -T Mutt -e mutt -y"),
(StarOffice, EXEC, soffice),
(
"screen w3m",
SHEXEC,
"export SHELL=/usr/bin/w3m; rxvt -name w3mTerm -bg OldLace -title w3m -e screen w3m /usr/share/doc/w3m/MANUAL.html"
),
(
w3m,
SHORTCUT,
"Shift+Mod1+w",
EXEC,
"rxvt -name w3mTerm -title w3m -e w3m directory.google.com"
),
(XChat, EXEC, xchat),
(
"Xlogo confirm",
SHEXEC,
" ~/bin/xlogo.sh \"%a(xlogo ,Run xlogo now [y/n?])\""
),
("Default menu", OPEN_MENU, "/etc/X11/WindowMaker/menu"),
(
Utilities,
(FSViewer, EXEC, fsviewer),
(Calculator, EXEC, xcalc),
(XProp, EXEC, xprop),
("Font Chooser", EXEC, xfontsel),
(ColorMap, EXEC, xcmap),
(ColorSel, EXEC, xcolorsel),
(
top,
SHORTCUT,
"Control+Mod1+p",
EXEC,
"rxvt -bg black -fg green -fn fixed -T top -e top -s"
),
(xosview, EXEC, xosview)
),
(
XShells,
(Eterm, EXEC, "/usr/bin/Eterm"),
("Gnome Term", EXEC, "/usr/bin/gnome-terminal"),
(Konsole, EXEC, konsole),
(rxvt, EXEC, rxvt),
(xterm, EXEC, xterm),
(wterm, EXEC, wterm),
(uxterm, EXEC, uxterm)
)
),
(
Editors,
(
vim,
SHORTCUT,
"Shift+Mod1+v",
EXEC,
"rxvt -T vim -bg darkslategrey -fg gold -cr yellow1 -e vim"
),
(emacs, EXEC, emacs),
(xemacs, SHORTCUT, "Shift+Mod1+x", EXEC, xemacs),
(elvis, EXEC, elvis),
(nedit, EXEC, nedit),
(ted, EXEC, ted),
(lyx, EXEC, lyx),
(
bvi,
EXEC,
"rxvt -T bvi -bg darkslategrey -fg green2 -cr yellow1 -e bvi"
)
),
(
Info,
(Info, INFO_PANEL),
("Legal Panel", LEGAL_PANEL),
(
"Help MENU",
("Debian Online Help", EXEC, "/usr/bin/dhelp"),
("Debian Online Help (old)", EXEC, "/usr/bin/dhelp_fsstnd"),
("Gnome Help", EXEC, "/usr/bin/gnome-help-browser"),
(Info, EXEC, "x-terminal-emulator -T 'Info' -e /usr/bin/info"),
(Xman, EXEC, xman)
)
),
("Debian menus", OPEN_MENU, "/etc/X11/WindowMaker/menu.hook"),
(
WorkSpace,
(Appearance, OPEN_MENU, appearance.menu),
("Arrange Icons", ARRANGE_ICONS),
("Clear Session", CLEAR_SESSION),
("Hide Others", HIDE_OTHERS),
("Save Session", SAVE_SESSION),
("Show All", SHOW_ALL)
),
(Workspaces, WORKSPACE_MENU),
(Refresh, REFRESH),
(
Screen,
(
Lock,
SHORTCUT,
"Shift+Mod1+slash",
EXEC,
"/usr/bin/xscreensaver-command -lock"
),
("Activate (no lock)", EXEC, "/usr/bin/xscreensaver-command -activate"),
("Enable Screensaver", EXEC, "/usr/bin/xscreensaver"),
("Disable Screensaver", EXEC, "/usr/bin/xscreensaver-command -exit"),
(
"Restart Screensaver",
EXEC,
"/usr/bin/xscreensaver-command -restart"
),
("Demo Screensaver", EXEC, "/usr/bin/xscreensaver-command -demo"),
("Screensaver Pefs", EXEC, "/usr/bin/xscreensaver-command -prefs")
),
(
Exit,
(Restart, RESTART),
(
WindowManagers,
(WindowMaker, RESTART, "/usr/X11R6/bin/wmaker"),
(Sawmill, RESTART, "/usr/bin/sawmill"),
(BlackBox, RESTART, "/usr/bin/blackbox"),
(Enlightenment, RESTART, "/usr/bin/enlightenment"),
(fvwm, RESTART, "/usr/bin/X11/fvwm"),
(vtwm, RESTART, "/usr/bin/X11/vtwm"),
(twm, RESTART, "/usr/bin/X11/twm"),
(KDE, RESTART, "/usr/bin/kde2"),
(GNOME, RESTART, "/usr/bin/gnome-session")
),
(Exit, EXIT),
("Exit X Session", SHUTDOWN)
)
)
--
JeromeAttachment:
pgpciUtLDJVHi.pgp
Description: PGP signature