diff options
| author | JaKooLit <ejhay.games@gmail.com~> | 2025-02-10 20:05:34 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com~> | 2025-02-10 20:05:34 +0900 |
| commit | 309314e5727bcb4f369c34489a1ee2c550bce20e (patch) | |
| tree | 9fbfc80bb10ffb075412dbd6a00ac9436ddabd5a | |
| parent | 01d5bc4d57ff565c0068d0f4528931071ad10d20 (diff) | |
updated dark - light switcher considering ags
| -rwxr-xr-x | config/hypr/scripts/DarkLight.sh | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 01b05b1c..f5b9389b 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -89,14 +89,16 @@ else fi # ags color change -if [ "$next_mode" = "Dark" ]; then - sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.4);/' "${ags_style}" - sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.7);/' "${ags_style}" - sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${ags_style}" -else - sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.4);/' "${ags_style}" - sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.7);/' "${ags_style}" - sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${ags_style}" +if command -v ags >/dev/null 2>&1; then + if [ "$next_mode" = "Dark" ]; then + sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.4);/' "${ags_style}" + sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.7);/' "${ags_style}" + sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${ags_style}" + else + sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.4);/' "${ags_style}" + sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.7);/' "${ags_style}" + sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${ags_style}" + fi fi # kitty background color change @@ -110,11 +112,6 @@ else sed -i '/^cursor /s/^cursor .*/cursor #000000/' "${kitty_conf}" fi -#for pid in $(pidof kitty); do -# kill -SIGUSR1 "$pid" -#done - - # Set Dynamic Wallpaper for Dark or Light Mode if [ "$next_mode" = "Dark" ]; then next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" |
