From 309314e5727bcb4f369c34489a1ee2c550bce20e Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 10 Feb 2025 20:05:34 +0900 Subject: updated dark - light switcher considering ags --- config/hypr/scripts/DarkLight.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'config/hypr/scripts') 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)" -- cgit v1.2.3