diff options
| author | skylar <me@casper> | 2026-11-01 07:11:15 -0800 |
|---|---|---|
| committer | skylar <me@casper> | 2026-11-01 07:11:15 -0800 |
| commit | b6c9feb9e223c88dcad3f4bff39ae9a01e7cdad0 (patch) | |
| tree | ebdb14242391446efdffbcd8cd3c206531ad7062 /bin/system-theme | |
| parent | 150558c0cf0ca5d0fbd002cd6a0d5a63fadd5111 (diff) | |
bin: read system-theme wallpapers from a config file; find photocollage through symlinks
system-theme sources ~/.config/system-theme/config, so wallpapers can be
set without the session environment. imgcollage resolves its own path, so a
symlink to it on PATH still finds the vendored photocollage beside the real
file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bin/system-theme')
| -rwxr-xr-x | bin/system-theme | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/system-theme b/bin/system-theme index 862b243..69c7a1f 100755 --- a/bin/system-theme +++ b/bin/system-theme @@ -1,10 +1,14 @@ #!/usr/bin/env sh # Switch the COSMIC desktop between light and dark mode, and optionally the # wallpaper with it: set SYSTEM_THEME_WALLPAPER_DARK and -# SYSTEM_THEME_WALLPAPER_LIGHT to image files. Emacs's auto-dark follows the -# desktop's mode on its own. On another desktop, this is the file to rewrite. +# SYSTEM_THEME_WALLPAPER_LIGHT to image files, in the environment or in +# ~/.config/system-theme/config. Emacs's auto-dark follows the desktop's mode +# on its own. On another desktop, this is the file to rewrite. -COSMIC="${XDG_CONFIG_HOME:-$HOME/.config}/cosmic" +CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}" +COSMIC="$CONFIG/cosmic" +# shellcheck source=/dev/null +[ -f "$CONFIG/system-theme/config" ] && . "$CONFIG/system-theme/config" set_wallpaper() { [ -n "$1" ] || return 0 |