Repository navigation
Conversation
omarchy-screensaver always read the global branding screensaver.txt, so switching themes never changed it. A theme's screensaver.txt now takes precedence when present, falling back to the branding file otherwise. A theme can also ship screensaver.conf with extra ttfx arguments (effect selection, frame rate, canvas size); any flag it sets there replaces the script's built-in default for that flag instead of duplicating it, since ttfx errors on a repeated flag. Both files are plain data, so staging already keeps them for both first-party and installed themes without any change to omarchy-theme-set.
[Medium impact] The changes affect theme customization for the screensaver. Fix the dropped final configuration line before merging. Findings
SummaryThemes can supply screensaver art and settings. The latest changes add:
The new parser skips the last setting when Reviews (5) · Last reviewed commit: "Document screensaver effect modes" · Reviewed by Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Nice theming hook — theme One small note: theme args are appended after Related (different knob): #11732 lets shell.json pin a single ttfx effect. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for the note! Good catch on the docs gap. I checked: a second |
|
Added theme-selectable effect modes, picking up the idea from #11178 (and the suggestion there to make the effect selectable instead of changing the default). |
| theme_args=() effect_args=() screensaver_mode=random screensaver_effect= | ||
| [[ -f $conf ]] || return 0 | ||
|
|
||
| while IFS= read -r line; do |
There was a problem hiding this comment.
The new while read loop skips the last line of screensaver.conf when it has no trailing newline. For example, --frame-rate followed by a final 30 now passes only --frame-rate to ttfx, which rejects the missing value and cannot show the art. The previous parser kept that line.
Keep a nonempty final value even when read returns failure at EOF: while IFS= read -r line || [[ -n $line ]]; do.
| while IFS= read -r line; do | |
| while IFS= read -r line || [[ -n $line ]]; do |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Idea from discussion #14303.
Problem
omarchy-screensaveralways reads~/.config/omarchy/branding/screensaver.txtand runsttfx --random-effectwith each effect's default settings. Switching themes changes nothing about it — with a custom theme and matching wallpapers, the screensaver is the one part of the desktop that can't follow along.What this does
screensaver.txtat its root. If present, it takes precedence over the global branding file. If absent, behavior is exactly as today.screensaver.conf: extrattfxarguments, one per line (blank lines and#comments ignored) — e.g. restricting--random-effectto specific effects via--include-effects/--exclude-effects, a different--frame-rate, or a fixed canvas size. Any flag set there replaces the script's built-in default for that same flag, sincettfx(clap) errors out if a flag is passed twice.omarchy-theme-setalready stages them for first-party themes and themes installed from a git repo — no change needed there.Effect modes
screensaver.confalso accepts two directives that the script reads itself:mode=random|single|firstandeffect=<name>. Lines aftereffect=are arguments for that effect (e.g. its colors), so a theme can pin one effect, or start with it and go random afterwards (idea from #11178). Without them nothing changes; an unknown mode or effect falls back to random.What's not included, and why
Colors are not derived automatically from
colors.toml: color flags like--final-gradient-stopsare effect-specific andttfxrejects them together with--random-effect. A theme sets them itself aftereffect=instead.Testing
test/shell.d/screensaver-theme-test.sh(effect modes, fallback to branding file, theme file precedence,screensaver.confargs overriding defaults — all mocked, no realttfx/Hyprland)../test/cliand./test/shellpass (pre-existing unrelated failures on this machine: missingomarchy-pkgscheckout, missingomasnap, a couple of compositor-dependent tests — none touch screensaver code).unlock.pngviaomarchy-transcode-ascii, dropped it in as that theme'sscreensaver.txt, ranomarchy theme set <theme>thenomarchy-launch-screensaver force— the screensaver showed the theme's art instead of the global branding logo.