Skip to content

Commit c67a427

Browse files
somiajThomasAdam
authored andcommitted
default-config bug fix and local config.
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.
1 parent 98b9520 commit c67a427

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

default-config/config

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,19 @@ InfoStoreAdd terminal xterm
5555
# actions that are run after a restart.
5656
DestroyFunc StartFunction
5757
AddToFunc StartFunction
58-
+ I Test (Init, f $[FVWM_USERDIR]/.BGdefault) \
59-
Exec exec fvwm-root $[FVWM_USERDIR]/.BGdefault
60-
+ I TestRc (NoMatch) Exec exec fvwm-root \
61-
$[FVWM_DATADIR]/default-config/images/background/bg1.png
58+
+ I Test (Init) InitBackground
6259
+ I Test (Init) Module FvwmBanner
6360
+ I Module FvwmButtons RightPanel
6461
+ I Module FvwmEvent EventNewDesk
6562

63+
# Function to set background when fvwm starts
64+
DestroyFunc InitBackground
65+
AddToFunc InitBackground
66+
+ I Test (f $[FVWM_USERDIR]/.BGdefault) \
67+
Exec exec fvwm-root $[FVWM_USERDIR]/.BGdefault
68+
+ I TestRc (NoMatch) Exec exec fvwm-root \
69+
$[FVWM_DATADIR]/default-config/images/background/bg1.png
70+
6671
# Mouse Bindings Functions
6772
DestroyFunc RaiseMoveX
6873
AddToFunc RaiseMoveX
@@ -654,3 +659,11 @@ DestroyModuleConfig EventNewDesk:*
654659
# This sets the default colorsets.
655660
*FvwmFormDefault: Colorset 10
656661
*FvwmFormDefault: ItemColorset 13
662+
663+
# Local configuration file. For use with the default-config.
664+
#
665+
# If $FVWMUSER_DIR/local.config ($HOME/.fvwm/local.config by default)
666+
# exists, then read it. This allows changes to default-config settings
667+
# without needing a full copy of the default-config. This will also allow
668+
# default-config changes to get used after upgrades (if applicable).
669+
Test (f $[FVWM_USERDIR]/local.config) Read $[FVWM_USERDIR]/local.config

0 commit comments

Comments
 (0)