Is It Possible to Define Time-Based Window Decoration Themes in FVWM?

Hello

I have been exploring FVWM’s powerful customization features & had an idea: is it possible to configure time-based window decoration themes? :innocent: For example; I would like FVWM to automatically apply a dark-themed decor & titlebar between 7 PM and 7 AM; and switch back to a lighter theme during the day similar to how some desktops handle light/dark mode.

I know that styles and decor can be changed using Style and AddToDecor directives, and time-based logic might be scripted using Schedule, PipeRead, or external shell scripts. :slightly_smiling_face: But I’m not sure what the cleanest / most FVWM-native way to implement this would be especially in terms of reapplying styles to existing windows and avoiding flickering. Checked FVWM Wiki – Style and Decor Concepts Looker Training guide for reference .

Has anyone attempted a setup like this? Are there specific hooks / best practices to handle global style changes on a time schedule within FVWM? :upside_down_face:This would be a great way to modernize the desktop while keeping it lightweight and customizable.

Thank you !! :slightly_smiling_face:

Hi @sienna

To do this, you would be better off to use cron or at and then call specific functions in fvwm, via FvwmCommand or FvwmPrompt.

So for example, let’s say you had two decors defined, one for AM one for PM (think: time of day):

DestroyDecor AM
AddToDecor AM
+ ...

DestroyDecor PM
AddToDecor PM
+ ...

Then, via cron or at, you could have a script which called:

FvwmCommand 'Style * UseDecor <FOO>'

Where <FOO> should be replaced with whichever decor you wanted to use.