diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/imgcollage | 2 | ||||
| -rwxr-xr-x | bin/system-theme | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/bin/imgcollage b/bin/imgcollage index 6211f87..50ef803 100755 --- a/bin/imgcollage +++ b/bin/imgcollage @@ -14,7 +14,7 @@ import os import random import sys -sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) from photocollage import collage, render # noqa: E402 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 |