diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2026-05-24 02:06:58 -0500 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2026-05-24 02:06:58 -0500 |
| commit | 5b935bd395ed7401f0a1ad92d119c9d594f2796d (patch) | |
| tree | d2f1359d566c87a9986e191e06c8edecaa4766cf /set-theme | |
| parent | 9572c2996509059d658bb393c215dd0afa90b827 (diff) | |
new themes
Diffstat (limited to 'set-theme')
| -rwxr-xr-x | set-theme | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -1,12 +1,12 @@ -#!/bin/bash +#!/bin/sh # CONFIG ignore_background_color="#04000a" highlight="#08000a" -default_theme="catppuccin" +default_theme="tokyo-night" # END CONFIG -cd "$(dirname "$0")" +cd "$(dirname "$0")" || exit ignore_file=0 list_files=0 @@ -14,7 +14,7 @@ ignore_background=0 run_pywal=0 set_wallpaper=0 -while getopts "h?lpbw" opt; do +while getopts "hlpbw" opt; do case "$opt" in h) printf -- "-l list themes @@ -33,6 +33,7 @@ WALLPAPER var can be specified for a wallpaper (WALLPAPER=\"somepath\" set-theme ;; w) set_wallpaper=1 ;; + *) break;; esac done @@ -41,17 +42,17 @@ shift $((OPTIND-1)) theme_file=$1 -if [ $list_files == 1 ]; then - ls $1 ./themes/ +if [ $list_files = 1 ]; then + ls "$1" ./themes/ exit 0 fi -if [ "$theme_file" == "" ]; then +if [ "$theme_file" = "" ]; then theme_file="$default_theme" fi -if [ $ignore_file == 0 ]; then - source ./themes/$theme_file.sh || exit 1 +if [ $ignore_file = 0 ]; then + . "themes/$theme_file.sh" || exit 1 fi if [ "$WALLPAPER" ]; then @@ -59,7 +60,7 @@ if [ "$WALLPAPER" ]; then fi -if [ $run_pywal == 1 ]; then +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 = //') @@ -79,13 +80,13 @@ if [ $run_pywal == 1 ]; then fi fi -[ $ignore_background == 1 ] && background="$ignore_background_color" +[ $ignore_background = 1 ] && background="$ignore_background_color" runs_dir="$(find ./targets -mindepth 1 -maxdepth 1 -type f -executable)" for s in $runs_dir; do - source "$s" + . "$s" done -if [ $set_wallpaper == 1 ] && [ "$wallpaper" ]; then +if [ "$wallpaper" ] && [ $set_wallpaper = 1 ]; then setwll -ua "$wallpaper" fi |
