Tk-Workspace
view release on metacpan or search on metacpan
eg/mwm_menu view on Meta::CPAN
#!/usr/bin/perl
my $text = <<'end-of-text';
Motif Dynamic Workspaces Menu
How to create a submenu of the mwm root menu that contains
the contents of a "workspaces" subdirectory.
The "Workspaces" submenu is updated whenever:
- You start mwm.
- You select "Update This Menu" from the "Workspaces" sub menu
of the root menu, and then select "Restart..." from the root
menu.
The you can either copy and paste the paste example scripts here using
the X clipboard, to files that reside in the ~/Scripts directory, or
use them to modify your existing files. In these examples, the
workspaces that are listed all reside in ~/workspaces directory. You
could create directories with these names, or substitute your own
directory configuration in the examples below.
If you have CDE, substitute ~/.dt/C/dtwmrc for ~/.mwmrc, and, if
possible, create the new menu as ~/.dt/dtwmrc, following the
instructions in ~/.dt/C/dtwmrc.
1. Save a copy of your ~/.mwmrc file, call it ~/.mwmrc-orig
or something similar.
2. in the ~/Scripts directory, create a template of a prototype
~/.mwmrc file, called '.mwmrc-raw' as shown here:
cut here
................................................................
!!
!! Root Menu Template
!!
Menu DefaultRootMenu
{
"Mwm Menu" f.title
"New Window" f.exec "xterm &"
no-label f.separator
!!
!! The Workspaces menu will be constructed when mwm is started,
!! or when the user selects the "Rebuild List" option from the
!! menu, and restarts the window manager.
!!
"Workspaces" f.menu "workspaces"
no-label f.separator
"Windows" f.menu "winmenu"
"Reload ~/.Xdefaults" f.exec "/usr/bin/X11/xrdb ~/.Xdefaults"
"Restart..." f.restart
no-label f.separator
"Quit..." f.quit_mwm
}
!!
!! Default Window Menu
!!
Menu DefaultWindowMenu
{
Restore _R Alt<Key>F5 f.restore
Move _M Alt<Key>F7 f.move
Size _S Alt<Key>F8 f.resize
Minimize _n Alt<Key>F9 f.minimize
Maximize _x Alt<Key>F10 f.maximize
Raise _L Alt<Key>F2 f.raise
Lower _L Alt<Key>F3 f.lower
no-label f.separator
Close _C Alt<Key>F4 f.kill
}
menu winmenu
( run in 1.659 second using v1.01-cache-2.11-cpan-84e82930d8c )