diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2025-08-31 19:04:23 -0500 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2025-08-31 19:04:23 -0500 |
| commit | e0aa53081377d415ab700fb49e14aef5ef7bd6fe (patch) | |
| tree | a0c7c32fc35925617b385291999005901c585a3b /set-theme | |
| parent | 31f5645c5527a8a396618505e21ee45198f2479c (diff) | |
- made catppuccin default :3
- added wallpaper var
- dont ignore file when using pywall
- can now use pywall without hyprpaper
- can now use the wallpaper var inside a theme file if it exist. will be overwritten by wallpaper var
Diffstat (limited to 'set-theme')
| -rwxr-xr-x | set-theme | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -3,7 +3,7 @@ # CONFIG ignore_background_color="#04000a" highlight="#08000a" -default_theme="tokyo-night" +default_theme="catppuccin" # END CONFIG cd "$(dirname "$0")" @@ -20,7 +20,9 @@ while getopts "h?lpbw" opt; do printf -- "-l list themes -p run pywall -b ignore background and use one defined in script --w set wallpaper with setwll if \$wallpaper exist" +-w set wallpaper with setwll if \$wallpaper exist + +WALLPAPER var can be specified for a wallpaper (WALLPAPER=\"somepath\" set-theme -p)" exit 0 ;; l) list_files=1 @@ -28,7 +30,6 @@ while getopts "h?lpbw" opt; do b) ignore_background=1 ;; p) run_pywal=1 - ignore_file=1 ;; w) set_wallpaper=1 ;; @@ -53,17 +54,28 @@ if [ $ignore_file == 0 ]; then source ./themes/$theme_file.sh || exit 1 fi +if [ "$WALLPAPER" ]; then + wallpaper="$WALLPAPER" +fi + if [ $run_pywal == 1 ]; then + # if your wallpaper engine your using can get the current active wallpaper. add it here if [ $(pgrep hyprpaper) ]; then wallpaper=$(hyprctl hyprpaper listactive | grep HDMI | sed 's/HDMI-A-1 = //') wal -seti "$wallpaper" . "$HOME/.cache/wal/colors.sh" - [ $ignore_background == 1 ] && background="$ignore_background_color" else - echo NO AVAILABLE WALLPAPER ENGINE - echo please define wallpaper - exit 1 + if [ "$wallpaper" ]; then + wal -seti "$wallpaper" + . "$HOME/.cache/wal/colors.sh" + else + echo pywll + echo unknown current engine. + echo please specify a wallpaper yourself + echo see set-theme -h for more help + exit 1 + fi fi fi |
