- 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
This commit is contained in:
26
set-theme
26
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user