Function to change theme

Have you ran the script in FvwmConsole? Indeed, have you checked to see that the symlinks are created properly? No where in your post have you said what isn’t happening…

– Thomas Adam

I am not sure why you need to reinvent fvwm-themes.

Anyway, use “ln -sfn” instead of “ln -s” to solve your problem.

Have you tried to delete $[FVWM_USERDIR]/themes/.current manually (`rm -rf ${HOME}/.fvwm/themes/.current’)? I’ve a very similar function for changing themes and it works pretty fine:

[code]DestroyFunc SetTheme
AddToFunc SetTheme

  • I Exec ln -sf $0 $[FVWM_USERDIR]/theme
  • I Restart[/code] with $0 being the theme file. There has to be something other wrong at your site. Maybe you accidently created the directory $[FVWM_USERDIR]/themes/.current (or you do it somewhere in your config?) and your function only does a simple `rm’ which does not delete directories, which would result in a link $[FVWM_USERDIR]/themes/.current/ThemeName -> $[FVWM_USERDIR]/themes/ThemeName instead of $[FVWM_USERDIR]/themes/.current -> $[FVWM_USERDIR]/themes/ThemeName

Well, it has several switchers to load the whole new theme or just several theme components. One using dynamical menus, one using FvwmScript, both use the command line, like “fvwm-themes-config --load @theme”.

Try to manually create a symbolic link to a directory from the shell, to see that “ln -sfn” replaces it, while “ln -s” does not.