Skip to content

Commit

Permalink
fvwm-menu-desktop more improvements
Browse files Browse the repository at this point in the history
 * Added --dynamic option.
 * Added --regen-cmd to control the Regenerate menu item.
 * Made titles default and added --without-titles
 * Added --all-menus to generate all menus and not try to
   find the best one.
 * Updated man page to reflect the changes.
 * Updated News file about changes.
  • Loading branch information
somiaj committed Oct 30, 2016
1 parent 91efbde commit 1cd6de7
Show file tree
Hide file tree
Showing 6 changed files with 453 additions and 183 deletions.
9 changes: 9 additions & 0 deletions NEWS
Expand Up @@ -41,6 +41,15 @@ Changes in stable release 2.6.7 (UNRELEASED)
- FvwmButtons learned a new option "Colorset" to its
ChangeButton command.

* fvwm-menu-desktop updated:

- Renamed default menu to XDGMenu and changed the name
of the FvwmForm to FvwmForm-XDGMenu-Config
- fvwm-menu-desktop will now load defaults from the
FvwmForm-XDGMenu-Config data file.
- Improved dynamic menus.
- Added new options: --regen-cmd, --dynamic, and more.

* Bug fixes:

- A bug introduced in 2.6.6 could cause applications with
Expand Down
65 changes: 52 additions & 13 deletions bin/fvwm-menu-desktop-config.fpl
Expand Up @@ -137,14 +137,6 @@ $fvwmform_commands .= "
*${modname}: Text \"\$[gt.Used Icon theme: ]\"
*${modname}: Input Theme 20 \"\"

*${modname}: Line left
*${modname}: Text \"\$[gt.Top Menu Name: ]\"
*${modname}: Input Title 20 \"\"

*${modname}: Text \"\$[gt. ]\"
*${modname}: Text \"\$[gt.Install-Prefix: ]\"
*${modname}: Input Installprefix 20 \"\"

*${modname}: Line left
*${modname}: Text \"\$[gt.Directory Icon: ]\"
*${modname}: Input DirIcon 20 \"gnome-fs-directory\"
Expand All @@ -153,14 +145,22 @@ $fvwmform_commands .= "
*${modname}: Text \"\$[gt.Application Icon: ]\"
*${modname}: Input AppIcon 20 \"gnome-applications\"

*${modname}: Line left
*${modname}: Text \"\$[gt.Top Menu Name: ]\"
*${modname}: Input Title 20 \"XDGMenu\"

*${modname}: Text \"\$[gt. ]\"
*${modname}: Text \"\$[gt.Insert Menu Into: ]\"
*${modname}: Input InsertInto 20 \"\"

*${modname}: Line left
*${modname}: Text \"\$[gt.Icon directory: ]\"
*${modname}: Input IconDir 30 \"~/.fvwm/icons\"
*${modname}: Text \"\$[gt. (Directory for converted icons)]\"

*${modname}: Line left
*${modname}: Text \"\$[gt.Output path: ]\"
*${modname}: Input Path 30 \"\$FVWM_USERDIR/.menu\"
*${modname}: Input Path 30 \"\$FVWM_USERDIR/.XDGMenu\"
*${modname}: Text \"\$[gt. (Full path to store output)]\"

*${modname}: Line left
Expand All @@ -169,7 +169,7 @@ $fvwmform_commands .= "

*${modname}: Line
*${modname}: Line expand
*${modname}: Button continue \"\$[gt.Generate Menus]\"
*${modname}: Button continue \"\$[gt.Save Menu]\"
*${modname}: Command PipeRead 'fvwm-menu-desktop \\
\$(IconsOn\?--enable-mini-icons )\\
\$(Size\?-s \$(Size) )\\
Expand All @@ -182,8 +182,8 @@ $fvwmform_commands .= "
\$(IconDir\?--mini-icon-dir \$(IconDir) )\\
\$(DirIcon\?--dir-icon \$(DirIcon) )\\
\$(AppIcon\?--app-icon \$(AppIcon) )\\
\$(InsertInto\?--insert-in-menu \$(InsertInto) )\\
\$(Title\?--title \$(Title) )\\
\$(Installprefix\?--install-prefix \$(Installprefix) )\\
\$(Theme\?--theme \$(Theme) )\\
--set-menus \"\\
";
Expand All @@ -197,7 +197,7 @@ foreach my $key (keys %all_menus) {

$fvwmform_commands .= "\" \$(Path\? > \$(Path)) 2>> ~/.xsession-errors && echo \"Read \$(Path\? \$(Path))\"'

*${modname}: Button continue \"\$[gt.Save Settings]\"
*${modname}: Button continue \"\$[gt.Save and Regenerate]\"

# Before saving the data, remove any previously saved data:
*${modname}: Command DestroyModuleConfig ${modname}Default: *
Expand Down Expand Up @@ -230,12 +230,51 @@ $fvwmform_commands .= ") > \$FVWM_USERDIR/.${modname}

*${modname}: Command !(/bin/echo \\
'*${modname}Default: Title \$(Title) ' ; /bin/echo \\
'*${modname}Default: Installprefix \$(Installprefix) '; /bin/echo \\
'*${modname}Default: InsertInto \$(InsertInto) ' ; /bin/echo \\
'*${modname}Default: Path \$(Path) ' ; /bin/echo \\
'*${modname}Default: IconDir \$(IconDir) ' ; /bin/echo \\
'*${modname}Default: DirIcon \$(DirIcon) ' ; /bin/echo \\
'*${modname}Default: AppIcon \$(AppIcon) ' \\
) >> \$FVWM_USERDIR/.${modname}

*${modname}: Command PipeRead 'fvwm-menu-desktop'

*${modname}: Button continue \"\$[gt.Save]\"

# Before saving the data, remove any previously saved data:
*${modname}: Command DestroyModuleConfig ${modname}Default: *
*${modname}: Command !( /bin/echo \\
\"# This file last created by ${modname} on: `/bin/date`.\"; /bin/echo \\
";

foreach my $key (keys %all_menus) {
foreach my $count (keys %{$all_menus{$key}}) {
my @menu = @{$all_menus{$key}{$count}};
$fvwmform_commands .= " '*${modname}Default: $menu[1] \$($menu[1]\?on) ' ; /bin/echo \\
";
}
}

$fvwmform_commands .= ") > \$FVWM_USERDIR/.${modname}

*${modname}: Command !(/bin/echo \\
'*${modname}Default: IncludeConfig\$(IncludeConfig\?on) ' ; /bin/echo \\
'*${modname}Default: IncludeRegen \$(IncludeRegen\?on) ' ; /bin/echo \\
'*${modname}Default: IncludeBoth \$(IncludeBoth\?on) ' ; /bin/echo \\
'*${modname}Default: IncludeNone \$(IncludeNone\?on) ' ; /bin/echo \\
'*${modname}Default: IconsOn \$(IconsOn\?on) ' ; /bin/echo \\
'*${modname}Default: IconsOff \$(IconsOff\?on) ' ; /bin/echo \\
'*${modname}Default: Size \$(Size) ' ; /bin/echo \\
'*${modname}Default: TitlesOn \$(TitlesOn\?on) ' ; /bin/echo \\
'*${modname}Default: TitlesOff \$(TitlesOff\?on) ' ; /bin/echo \\
'*${modname}Default: Theme \$(Theme) ' \\
) >> \$FVWM_USERDIR/.${modname}

*${modname}: Command !(/bin/echo \\
'*${modname}Default: Title \$(Title) ' ; /bin/echo \\
'*${modname}Default: InsertInto \$(InsertInto) ' ; /bin/echo \\
'*${modname}Default: Path \$(Path) ' ; /bin/echo \\
'*${modname}Default: IconDir \$(IconDir) ' ; /bin/echo \\
'*${modname}Default: DirIcon \$(DirIcon) ' ; /bin/echo \\
'*${modname}Default: AppIcon \$(AppIcon) ' \\
) >> \$FVWM_USERDIR/.${modname}
Expand Down

0 comments on commit 1cd6de7

Please sign in to comment.