diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-01-16 10:54:47 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-16 10:54:47 +0900 |
| commit | c30b1c5599daa78169486d76c9d3dd2fba3803a8 (patch) | |
| tree | a50caee93fc0c2f0d8c02f6d0120af71cc24f1ac /config/hypr/scripts/DarkLight.sh | |
| parent | a4956da883d5fe2d66d528d2e9a890a2c6d064a8 (diff) | |
| parent | 47a6c42c77244b4b18f6e074542c15bc43bc4273 (diff) | |
Merge pull request #526 from JaKooLit/development
Development to main
Diffstat (limited to 'config/hypr/scripts/DarkLight.sh')
| -rwxr-xr-x | config/hypr/scripts/DarkLight.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 50395493..0ad5e0dc 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -24,7 +24,7 @@ pallete_light="light16" pkill swaybg # Initialize swww if needed -swww query || swww-daemon +swww query || swww-daemon --format xrgb # Set swww options swww="swww img" @@ -48,7 +48,7 @@ update_theme_mode() { # Function to notify user notify_user() { - notify-send -u low -i "$notif" "$(printf "\n Switching to $1 mode")" + notify-send -u low -i "$notif" " Switching to" " $1 mode" } # Use sed to replace the palette setting in the wallust config file @@ -109,6 +109,7 @@ else sed -i '/^background /s/^background .*/background #dddddd/' "${kitty_conf}" sed -i '/^cursor /s/^cursor .*/cursor #000000/' "${kitty_conf}" fi + for pid in $(pidof kitty); do kill -SIGUSR1 "$pid" done @@ -231,12 +232,21 @@ update_theme_mode ${SCRIPTSDIR}/WallustSwww.sh && + +# some process to kill +_ps=(waybar rofi swaync ags swaybg) +for _prs in "${_ps[@]}"; do + if pidof "${_prs}" >/dev/null; then + pkill "${_prs}" + fi +done + sleep 2 ${SCRIPTSDIR}/Refresh.sh sleep 0.3 # Display notifications for theme and icon changes -notify-send -u normal -i "$notif" "$(printf "\n Themes switched to \n $next_mode Mode")" +notify-send -u normal -i "$notif" " Themes switched to:" " $next_mode Mode" exit 0 |
