| 1 |
#!/usr/bin/install-menu |
| 2 |
# |
| 3 |
# debian menu method for the fvwm-crystal desktop environment |
| 4 |
# Author: Michael Stilkerich <[email protected]> |
| 5 |
# Modified by Vincent Bernat <[email protected]> |
| 6 |
# |
| 7 |
compat="menu-1" |
| 8 |
|
| 9 |
!include menu.h |
| 10 |
|
| 11 |
compat="menu-2" |
| 12 |
|
| 13 |
outputencoding="LOCALE"; |
| 14 |
|
| 15 |
supported; |
| 16 |
x11= "x11|*|" $command "|*|" title() "|*|" $basesection "|*|" icon() "\n"; |
| 17 |
text= "text|*|" $command "|*|" title() "|*|" $basesection "|*|" icon() "\n"; |
| 18 |
endsupported; |
| 19 |
|
| 20 |
# generate a file name in the fvwm-crystal appdb format. |
| 21 |
# do nothing for sections |
| 22 |
genmenu=ifeqelse($needs, "", "", "fvwm-crystal.debian-menu"); |
| 23 |
startmenu=""; |
| 24 |
endmenu=""; |
| 25 |
|
| 26 |
# the root of the menu is debian |
| 27 |
rootsection="/debian"; |
| 28 |
rootprefix="/var/lib/fvwm-crystal/Applications"; |
| 29 |
|
| 30 |
# runnable as user, but will exit with error if debian Application subdir not |
| 31 |
# writeable (masked out by user) |
| 32 |
userprefix=".fvwm/Applications"); |
| 33 |
|
| 34 |
treewalk="M"; |
| 35 |
|
| 36 |
# remove the whole Debian menu and rebuild from scratch |
| 37 |
prerun="rm -rf " prefix() rootsection(); |
| 38 |
|
| 39 |
# all menu files must be executable to show up in the menu |
| 40 |
postrun="python3 /usr/share/fvwm-crystal/debian/createmenu.py --install " prefix(); |
| 41 |
|
| 42 |
# executed upon update-menus --remove |
| 43 |
removemenu="python3 /usr/share/fvwm-crystal/debian/createmenu.py --remove " prefix(); |