Skip to content

Commit

Permalink
Test for manulpages in default-config.
Browse files Browse the repository at this point in the history
Only show the "Help" menu if the manual pages are installed. This
is done by testing for the fvwm3all manual page, and the item
entry to popup the "Help" menu is only added to the root menu
if the fvwm3all manual page exists.
  • Loading branch information
somiaj committed Oct 16, 2024
1 parent e660993 commit cf1662e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions default-config/config
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ InfoStoreAdd runcmdopt "-nb '#2b4e5e'"
#
DesktopConfiguration global

# Test to determine if the fvwm manual pages have been installed.
# This is used to determine if the help menu is shown or not.
# Test both man -w and man -f as not all systems support -w.
PipeRead 'man -w fvwm3all >/dev/null 2>&1 || man -f fvwm3all >/dev/null 2>&1 && echo "InfoStoreAdd fvwm3man True"'

###########
# 1: Functions
#
Expand Down Expand Up @@ -320,7 +325,7 @@ Test (x $[infostore.runcmd]) + "R&un Command%icons/run_arrow.png%" Exec exec $[i
Test (x $[FVWM_MODULEDIR]/FvwmConsole) + "Fvwm&Console%icons/terminal.png%" Module FvwmConsole -terminal $[infostore.terminal]
Test (x FvwmPrompt) + "&FvwmPrompt%icons/terminal.png%" Exec exec $[infostore.terminal] -e FvwmPrompt
+ "$[gt.&Wallpapers]%icons/wallpaper.png%" Popup BGMenu
+ "$[gt.M&an Pages]%icons/help.png%" Popup MenuFvwmManPages
Test (EnvMatch infostore.fvwm3man True) + "$[gt.M&an Pages]%icons/help.png%" Popup MenuFvwmManPages
+ "$[gt.Cop&y Config]%icons/conf.png%" FvwmScript FvwmScript-ConfirmCopyConfig
+ "" Nop
+ "$[gt.Re&fresh]%icons/refresh.png%" Refresh
Expand Down Expand Up @@ -702,4 +707,4 @@ DestroyModuleConfig EventNewDesk:*
# exists, then read it. This allows changes to default-config settings
# without needing a full copy of the default-config. This will also allow
# default-config changes to get used after upgrades (if applicable).
Test (f $[FVWM_USERDIR]/local.config) Read $[FVWM_USERDIR]/local.config
Test (f $[FVWM_USERDIR]/local.config) Read $[FVWM_USERDIR]/local.config

0 comments on commit cf1662e

Please sign in to comment.