Skip to content

Commit

Permalink
default-config bug fix and local config.
Browse files Browse the repository at this point in the history
  Fixes a bug with StartFunction resetting the background image
  on a restart and adds an optional $FVWM_USERDIR/local.config
  for local overrides.

  Originally from Debian.
  • Loading branch information
somiaj authored and ThomasAdam committed Oct 19, 2022
1 parent 98b9520 commit c67a427
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions default-config/config
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,19 @@ InfoStoreAdd terminal xterm
# actions that are run after a restart.
DestroyFunc StartFunction
AddToFunc StartFunction
+ I Test (Init, f $[FVWM_USERDIR]/.BGdefault) \
Exec exec fvwm-root $[FVWM_USERDIR]/.BGdefault
+ I TestRc (NoMatch) Exec exec fvwm-root \
$[FVWM_DATADIR]/default-config/images/background/bg1.png
+ I Test (Init) InitBackground
+ I Test (Init) Module FvwmBanner
+ I Module FvwmButtons RightPanel
+ I Module FvwmEvent EventNewDesk

# Function to set background when fvwm starts
DestroyFunc InitBackground
AddToFunc InitBackground
+ I Test (f $[FVWM_USERDIR]/.BGdefault) \
Exec exec fvwm-root $[FVWM_USERDIR]/.BGdefault
+ I TestRc (NoMatch) Exec exec fvwm-root \
$[FVWM_DATADIR]/default-config/images/background/bg1.png

# Mouse Bindings Functions
DestroyFunc RaiseMoveX
AddToFunc RaiseMoveX
Expand Down Expand Up @@ -654,3 +659,11 @@ DestroyModuleConfig EventNewDesk:*
# This sets the default colorsets.
*FvwmFormDefault: Colorset 10
*FvwmFormDefault: ItemColorset 13

# Local configuration file. For use with the default-config.
#
# If $FVWMUSER_DIR/local.config ($HOME/.fvwm/local.config by default)
# 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

0 comments on commit c67a427

Please sign in to comment.