FVWM3-MENU-DESKTOP(1)
π FVWM3-MENU-DESKTOP π (the fvwm3-menu-desktop(1) manual, bestie)
πΈ NAME πΈ
fvwm3-menu-desktop β reads XDG menu files and creates Fvwm menus π
β¨ SYNOPSIS β¨
fvwm3-menu-desktop [ --help|-h ] [ --version ] [ --install-prefix DIR ]
[ --desktop NAME ] [ --menu-type NAME ] [ --theme NAME ] [
--with-titles|-w ] [ --without-titles ] [ --enable-mini-icons ] [
--size|-s NUM ] [ --mini-icon-dir DIR ] [ --app-icon NAME ] [ --dir-icon
NAME ] [ --title|-t NAME ] [ --insert-in-menu NAME ] [ --get-menus
all|desktop ] [ --set-menus menu_paths ] [ --all-menus ] [
--include-items NAME ] [ --regen-cmd CMD ] [ --term-cmd CMD ] [
--dynamic ] [ --menu-error|-e ] [ --verbose|-v ]
π¦ DESCRIPTION π¦
Okay so this is a python script, right? And what it does is it parses XDG menu definitions and builds the matching fvwm menus out of them. Iconic behavior fr fr. Just know that it depends on python-xdg to actually run β no python-xdg, no menu magic π
π MAIN OPTIONS π
--helpβ shows you the help and then dips. Bye! π--versionβ shows the version and exits. Periodt.--get-menus all|desktopβ prints a space separated list of full menu paths it found on your system.allprints every menu on the system except the empty ones.desktopprints the menu(s) that would be generated by the script. Heads up bestie: no menu generation is done when you use this. It's just a lil peek π--desktop NAMEβ optional parameter that sets theNAMEof the desktop XDG.menufile(s) to use. This overrides any default menus you set viaFvwmForm-XDGMenu-Config, and it makes the script go find menus whereNAMEis part of the file name. Possible names include:gnome,kde,xfce,lxde,debian, etc. You can run this together with--menu-typeto control which.menufile(s) get used π--menu-type NAMEβ optional parameter that sets theNAMEof the XDG menu type to use. This overrides any default menus set viaFvwmForm-XDGMenu-Configand makes the script find menus whereNAMEis part of the file name. PossibleNAMEtypes could be:applications,settings,preferences, etc. When you use it with--desktop, only menus whose file name matches'destkop*menutype'are found. And if no menus are found? The script exits with an error, sorry babe π--all-menusβ builds all the menus found on the system. If you pair it with--desktopor--menu-type, it builds all the menus matching those settings. Greedy in the best way π--install-prefix DIRβ optional parameter that overrides the standard locations for XDG menu definitions. It tellsfvwm3-menu-desktopto look inDIRfor.menufiles instead of the standard locations/etc/xdg/menus(and$HOME/.config/menusif it exists) ποΈ--with-titles|-wβ if this is set, menus are generated with titles. This is the default. You can use it to override theFvwmForm-XDGMenu-Configdefault setting π--without-titlesβ if this is set, menus are generated without titles. The default is to generate with titles, so this is your "actually, no titles" button.--title|-t NAMEβ define the menu titleNAMEof the top menu used by Fvwm'sMenuorPopupcommands. Default is"XDGMenu"β¨--include-items NAMEβ controls whether the extra menu items'Regenerate'and'Configure'get included in the top level menu.NAMEcan be one ofregenerate,config,both, ornone. Default isboth.--regen-cmd CMDβ sets the fvwm commandCMDthat runs when you pick the'Regenerate'menu item. Default is"PipeReadfvwm3-menu-desktop".--term-cmd CMDβ sets the terminal emulator commandCMDthat's used to run terminal applications in.CMDneeds to end with an execute option, like xterm's-eoption, which will run the command that gets appended toCMD. Default is"xterm -e". π Debian specific: per Debian policy, the default is changed to"x-terminal-emulator -e".--dynamicβ use this one when you're creating dynamic menus withDynamicPopUpActionandDynamicPopDownAction. It adds a'recreate'to theDestroyMenucommand on the top level menu so those actions don't getDestroyedwhen the menu regenerates. Keep your dynamic actions alive, periodt π₯--insert-in-menu NAMEβ inserts the generated menu(s) IN a menuNAME(its top title). This makes it so the top level menu is notDestroyedand the items get added to the end. > β οΈ Heads up: menus regenerated with this option will append the menu items at the end of the existing menu. Each time the menu is regenerated, new menu items appear, giving you a growing menu of duplicate items π. You have to regenerate the whole menu via a function or restart fvwm. See EXAMPLES below for some solutions.--set-menus menu_pathsβ generates all menus listed in a space separated list of full menu paths. This option overrides any defaults and the--desktop|--menu-typesettings.--menu-error|-eβ if this option is present andpython-xdgis not found, the script will print the error in the generated menu. Used in the default-config π--verboseβ enables additional information printouts on STDERR. For the girlies who need to see everything π
π ICONS OPTIONS π
By default, fvwm3-menu-desktop builds menus without mini-icons. To turn mini-icons on, use the options below π
If ImageMagick is installed on the system, the script will resize and copy the icons to $FVWM_USERDIR/.icons. This can take awhile π© You should be prepared to wait the first time you generate the icons. Once the icons have been generated, the script should run faster. If it's still too slow using icons, see EXAMPLES for ways to limit how often the menu gets generated to speed things up.
--enable-mini-iconsβ turns mini-icons on in the menus. If set,24x24mini-icons are used. If the specified icon isn't that size, it will be converted (if ImageMagick is installed) and saved in$HOME/.fvwm/iconsor to the directory you specify with the--mini-icon-diroption. Otherwise, no icon appears in the menu for that entry. With most distributions, all the menu entries will have mini-icons appropriate to the application π--theme NAMEβ defines the icon theme used. Default isgnome, but all the others found in/usr/share/iconscould be used β except thehicolortheme, because it's the default fallback theme if no icon is found. iykyk π¨--size|-s NUMβ if--enable-mini-iconsis used, the size of the icons can be changed with this parameter. Default is24.--mini-icon-dir DIRβ when a mini-icon of the right size isn't available,fvwm3-menu-desktopcreates icons with the right size in$HOME/.fvwm/icons. If you don't want to use the default directory,$HOME/.fvwm/icons, use this option to specify a different folder π--app-icon NAMEβ sets the default application icon if no others are found. Default is'gnome-applications'.--dir-icon NAMEβ sets the default directory icon if no others are found. Default is'gnome-fs-directory'.
π USAGE π
fvwm3-menu-desktop outputs XDG .menu files in the syntax of fvwm menus. When you run it with no options, it will load defaults from the FvwmForm-XDGMenu-Config file (see below), then search your system for suitable menu file(s). Wanna see which menus are available on your system? Run:
fvwm3-menu-desktop --get-menus all
If no menus are found, you might just not have any installed on your system. By default, menus are stored as .menu files in /etc/xdg/menus, $HOME/.config/menus or the location set in $XDG_MENU_PREFIX. You can use *--install-prefix to specify another location to search for menus.
Through some combination of command line options and the FvwmForm-XDGMenu-Config settings, fvwm3-menu-desktop can generate any combination of the menus found. To get a list of what menu(s) would be generated, use the --get-menus desktop option. The following will list all menus generated if fvwm3-menu-desktop was run with no options:
fvwm3-menu-desktop --get-menus desktop
fvwm3-menu-desktop determines which menu(s) to generate like this π
- If no config file is found, all menus will be weighted and the script will generate the best (highest weight) menu found. Winner winner π
- If a config file is found (and override options are not used), the script will generate all menus selected in
FvwmForm-XDGMenu-Config. --desktop,--menu-type,--set-menusand--all-menuswill override any menus selected inFvwmForm-XDGMenu-Config.--desktopand--menu-typewill only include menus whose name matches'desktop*menutype'. If used with--all-menus, all matching menus are generated. If used without--all-menus, only the highest weighted menu is generated.--set-menusgenerates menus from the list of full path menu file names.--all-menusby itself will generate all menus found.
By default, fvwm3-menu-desktop will generate a menu whose top level name is "XDGMenu". To tell fvwm to read the output of fvwm3-menu-desktop to create the menu XDGMenu, add the following to your fvwm config file:
PipeRead 'fvwm3-menu-desktop'
β οΈ Warning: Depending on the options used, this command may be slow and fvwm will pause until this command is complete. See EXAMPLES below for more details and possible workarounds π
Once the menu is generated, you can open the menu by using the command "Menu XDGMenu". You can also include this in the MenuFvwmRoot menu by:
AddToMenu MenuFvwmRoot "XDG Menu" Popup XDGMenu
fvwm3-menu-desktop can be configured through both command line options and a FvwmForm GUI to customize the menu(s) that get generated π
π§ GUI π§
FvwmForm-XDGMenu-Config is a FvwmForm interface you can use to configure the defaults for fvwm3-menu-desktop. You can access it from the "Configure" item in the top level menu that gets generated, or run the following from within FvwmCommand or FvwmPrompt:
Module FvwmPerl -l fvwm-menu-desktop-config.fpl
This form can be used to select which menu(s) get generated by default, along with setting many (but not all) of the available options. When you click "Save Settings", the form will write a config file located at $FVWM_USERDIR/.FvwmForm-XDGMenu-Config that fvwm3-menu-desktop will parse for defaults when it runs π«Ά
See the help inside of FvwmForm-XDGMenu-Config for more information.
β¨ EXAMPLES β¨
okay bestie, here's the tea on how people actually set this up π« there are sooo many ways to make fvwm run fvwm3-menu-desktop and generate your menu, so let's go through the hits.
Method one: generate it once at startup and vibe. You just generate the menu when fvwm loads, and then use the GUI config tool to change whatever options you want. All you gotta add to your fvwm config file is this:
AddToMenu MenuFvwmRoot "XDG Menu" Popup XDGMenu PipeRead
'fvwm3-menu-desktop'
so the menu gets created once, when fvwm loads. π and yeah, lowkey, menu creation can sometimes be slow, which means fvwm might take longer to load than you'd like. sorry bestie π
and because the menu is only generated when fvwm starts, if you install or remove software you're gonna have to pick the 'Regenerate' option to rebuild the menu. no cap.
Method two: the speedrun β write it to a file. One way to speed things up is to save the menu in a file and only generate the menu when 'Regenerate' is selected. To do that, use --regen-cmd to call a custom function and write the menu to a file with a command like:
fvwm3-menu-desktop --regen-cmd XDGRegen > $FVWM_USERDIR/.XDGMenu
then add the following to the fvwm config file to define the function XDGRegen. the second to last line will generate the menu if the menu file doesn't exist when fvwm starts. β¨
DestroyFunc XDGRegen
AddToFunc XDGRegen
+ I PipeRead 'fvwm3-menu-desktop --regen-cmd XDGRegen > \
$[FVWM_USERDIR]/.XDGMenu; echo "Nop"'
+ I Read $[FVWM_USERDIR]/.XDGMenu
Test (!f $[FVWM_USERDIR]/.XDGMenu) XDGRegen Read $[FVWM_USERDIR]/.XDGMenu
Method three: slide into an existing menu. besides creating a top level menu, fvwm3-menu-desktop can insert the menu into an existing menu using the --insert-in-menu option. for example, you could create the menu MenuFvwmRoot and include the XDG items at the end:
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot "Fvwm" Title
+ "Item1" Action1 ...
+ "ItemN" ActionN
+ "" Nop
PipeRead 'fvwm3-menu-desktop --insert-in-menu MenuFvwmRoot'
in this case the menu items are inserted at the end of the MenuFvwmRoot menu. if no items are in the menu, this menu becomes MenuFvwmRoot. π
but here's the problem bestie: you have to restart fvwm or rebuild the whole menu to Regenerate it, because menu items cannot be removed. it's giving one-way street π
to do that, you could use a function like:
DestroyFunc XDGRegen
AddToFunc XDGRegen
+ I DestroyMenu MenuFvwmRoot
+ I AddToMenu MenuFvwmRoot "Fvwm" Title
+ I AddToMenu MenuFvwmRoot "Item1" Action1 ...
+ I AddToMenu MenuFvwmRoot "ItemN" ActionN
+ I AddToMenu MenuFvwmRoot "" Nop
+ I PipeRead 'fvwm3-menu-desktop --insert-in-menu MenuFvwmRoot \
--regen-cmd XDGRegen'
Method four: dynamic menus, main character energy. π Fvwm can also create menus dynamically by using DynamicPopUpAction and/or DynamicPopDownAction. these commands, when used with a Menu, will run a Function when the menu is opened. for example, you could create the menu XDGMenu when it is opened using:
AddToMenu XDGMenu "XDGMenu" Title
+ DynamicPopUpAction PipeRead 'fvwm3-menu-desktop'
this will create the menu when it is opened. one issue here is that it will only create the menu the first time it is opened, and you still have to Regenerate the menu to see any changes. π to create the menu each time it is open, use the --dynamic option:
AddToMenu XDGMenu "XDGMenu" Title
+ DynamicPopUpAction PipeRead 'fvwm3-menu-desktop \
--dynamic --include-items config'
+ DynamicPopDownAction DestroyMenu recreate XDGMenu
this will now Destroy the menu when it's closed so it can be rebuilt the next time it is opened. the recreate flag doesn't completely destroy the menu β it keeps the DynamicPopUpAction and DynamicPopDownAction actions alive. and the --dynamic flag includes the recreate option in the generated menus. slay π
Method five: insert AND stay dynamic. to insert a menu into MenuFvwmRoot and still be dynamic, you need to use a function that generates the whole menu. for example:
DestroyFunc GenRootMenu
AddToFunc GenRootMenu
+ I DestroyMenu recreate MenuFvwmRoot
+ I AddToMenu MenuFvwmRoot "Fvwm" Title
+ I AddToMenu MenuFvwmRoot "Item1" Action1 ...
+ I AddToMenu MenuFvwmRoot "ItemN" ActionN
+ I AddToMenu MenuFvwmRoot "" Nop
+ PipeRead `fvwm3-menu-desktop --insert-in-menu MenuFvwmRoot \
--include-items config`
AddToMenu MenuFvwmRoot "Fvwm" Title
+ DynamicPopUpAction GenRootMenu
+ DynamicPopDownAction DestroyMenu recreate MenuFvwmRoot
periodt. π
π BUGS π
ngl, the whole process of creating menus from files is slow. π otherwise, report bugs to the fvwm-workers mailing list fvwm-workers@fvwm.org.
π AUTHORS π
this script is based on fvwm-xdg-menu.py written by Piotr Zielinski (http://www.cl.cam.ac.uk/~pz215/) who assigned Licence: GPL 2 and Date: 03.12.2005. π
the script was reworked to replace the existing fvwm3-menu-desktop perl script by the fvwm-workers. iconic behavior fr fr π
π«Ά COPYING π«Ά
the script is distributed by the same terms as fvwm itself. see GNU General Public License for details.
and that's a wrap bestie!! β¨ this was FVWM3-MENU-DESKTOP(1), dated 2026-07-31 β go forth and make your menu gorgeous, you absolute icon π¦π
π¦ where this page comes from
- ubuntu stonking: fvwm3 1.1.5+ds-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms