From 33d4cd47ce639aeb39991b944895477a0e3b1745 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 27 Dec 2023 20:58:22 +0900 Subject: updated swaync, Settings animation and DarkLight.sh --- config/hypr/scripts/DarkLight.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index a2b7af70..ec8c4473 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -1,10 +1,11 @@ #!/bin/bash -#set -x +set -x # Paths wallpaper_base_path="$HOME/Pictures/wallpapers/Dynamic-Wallpapers" dark_wallpapers="$wallpaper_base_path/Dark" light_wallpapers="$wallpaper_base_path/Light" hypr_config_path="$HOME/.config/hypr" +swaync_style="$HOME/.config/swaync/style.css" SCRIPTSDIR="$HOME/.config/hypr/scripts" notif="$HOME/.config/swaync/images/bell.png" dark_rofi_pywal="$HOME/.cache/wal/colors-rofi-dark.rasi" @@ -61,6 +62,15 @@ set_waybar_style "$next_mode" notify_user "$next_mode" +# swaync 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.8);/' "${swaync_style}" + sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${swaync_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.9);/' "${swaync_style}" + sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${swaync_style}" +fi + # 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)" @@ -177,8 +187,7 @@ sleep 1 ${SCRIPTSDIR}/Refresh.sh # Display notifications for theme and icon changes -notify-send -u normal -i "$notif" "Themes are set to $selected_theme" -notify-send -u normal -i "$notif" "Icon themes set to $selected_icon" +notify-send -u normal -i "$notif" "Themes in $next_mode Mode" exit 0 -- cgit v1.2.3