| 1 |
# You can find here some basic FVWM-Crystal functions |
| 2 |
|
| 3 |
# This function looks for specified file in the user's directory (~/.fvwm/), |
| 4 |
# then system-wide directory (/etc/X11/fvwm/fvwm-crystal/), then "package" |
| 5 |
# directory (/usr/[local]/share/fvwm-crystal/fvwm) and loads the first one it |
| 6 |
# finds. It's useful for files that should be changed/replaced as a whole, ex. |
| 7 |
# functions or scripts. |
| 8 |
# |
| 9 |
DestroyFunc Include |
| 10 |
AddToFunc Include |
| 11 |
+ I Test (f $[FVWM_USERDIR]/$*) Read $[FVWM_USERDIR]/$* |
| 12 |
+ I TestRc (NoMatch) Test (f $[FVWM_CONFIGDIR]/$*) Read $[FVWM_CONFIGDIR]/$* |
| 13 |
+ I TestRc (NoMatch) Test (f $[FVWM_SYSTEMDIR]/$*) Read $[FVWM_SYSTEMDIR]/$* |
| 14 |
|
| 15 |
# This function works exactly as the above, except that it looks for specified |
| 16 |
# FvwmScript script and launches it. |
| 17 |
# |
| 18 |
DestroyFunc Script |
| 19 |
AddToFunc Script |
| 20 |
+ I Test (f $[FVWM_USERDIR]/$*) FvwmScript $[FVWM_USERDIR]/$* |
| 21 |
+ I TestRc (NoMatch) Test (f $[FVWM_CONFIGDIR]/$*) FvwmScript $[FVWM_CONFIGDIR]/$* |
| 22 |
+ I TestRc (NoMatch) Test (f $[FVWM_SYSTEMDIR]/$*) FvwmScript $[FVWM_SYSTEMDIR]/$* |
| 23 |
|
| 24 |
# This function kills previously started FvwmScript |
| 25 |
# |
| 26 |
DestroyFunc KillScript |
| 27 |
AddToFunc KillScript |
| 28 |
+ I Test (f $[FVWM_USERDIR]/$*) KillModule FvwmScript $[FVWM_USERDIR]/$* |
| 29 |
+ I TestRc (NoMatch) Test (f $[FVWM_CONFIGDIR]/$*) KillModule FvwmScript $[FVWM_CONFIGDIR]/$* |
| 30 |
+ I TestRc (NoMatch) Test (f $[FVWM_SYSTEMDIR]/$*) KillModule FvwmScript $[FVWM_SYSTEMDIR]/$* |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
# This function looks for specified file in package-wide directory, then |
| 35 |
# system-wide directory and the user-wide directory at the end, loading any |
| 36 |
# that is found (all of them can be loaded one after another, if present). |
| 37 |
# It's useful for files which holds the general settings, like window styles. |
| 38 |
# |
| 39 |
DestroyFunc Append |
| 40 |
AddToFunc Append |
| 41 |
+ I Test (f $[FVWM_SYSTEMDIR]/$*) Read $[FVWM_SYSTEMDIR]/$* |
| 42 |
+ I Test (f $[FVWM_CONFIGDIR]/$*) Read $[FVWM_CONFIGDIR]/$* |
| 43 |
+ I Test (f $[FVWM_USERDIR]/$*) Read $[FVWM_USERDIR]/$* |
| 44 |
|
| 45 |
# Load other useful functions by default used in many places |
| 46 |
Include components/bindings/Remove-Defaults |
| 47 |
Include components/functions/Preferences |
| 48 |
Include components/functions/Keyboard-Modifiers |
| 49 |
Include components/functions/FindFunctions |
| 50 |
LoadPreferences SilentOps |
| 51 |
Include components/functions/Exec-Accelerator |
| 52 |
|
| 53 |
# vim:ft=fvwm |