aboutsummaryrefslogtreecommitdiff
path: root/set-theme
diff options
context:
space:
mode:
Diffstat (limited to 'set-theme')
-rwxr-xr-xset-theme26
1 files changed, 19 insertions, 7 deletions
diff --git a/set-theme b/set-theme
index f4b5e30..282d6b1 100755
--- a/set-theme
+++ b/set-theme
@@ -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