aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-01-14 23:08:04 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-01-14 23:08:04 +0900
commitcf500ed0db96d3602478d3dc7b24a8be357b7315 (patch)
treedec62792ff8d60546b927622c557867a08ab7e64 /config/hypr/scripts
parent56f4dc4d4e89434de3d5e2888cb10852c0349365 (diff)
some tweaks on scripts
Diffstat (limited to 'config/hypr/scripts')
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh12
-rwxr-xr-xconfig/hypr/scripts/Refresh.sh22
2 files changed, 23 insertions, 11 deletions
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index 50395493..dbbb9244 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"
@@ -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,6 +232,15 @@ 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
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh
index 78f76702..77ba1496 100755
--- a/config/hypr/scripts/Refresh.sh
+++ b/config/hypr/scripts/Refresh.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Scripts for refreshing ags waybar, rofi, swaync, wallust
+# Scripts for refreshing ags, waybar, rofi, swaync, wallust
SCRIPTSDIR=$HOME/.config/hypr/scripts
UserScripts=$HOME/.config/hypr/UserScripts
@@ -27,21 +27,23 @@ killall -SIGUSR2 waybar # added since wallust sometimes not applying
# quit ags
ags -q
-# relaunch swaync
-sleep 0.5
-swaync > /dev/null 2>&1 &
-
# relaunch ags
ags &
-# Kill waybar (yet again) # added since wallust sometimes not applying
-if pidof waybar >/dev/null; then
- pkill waybar
-fi
+# Kill waybar & swaync (yet again) # added since wallust sometimes not applying
+_ps2=(waybar swaync)
+for _prs2 in "${_ps2[@]}"; do
+ if pidof "${_prs2}" >/dev/null; then
+ killall "${_prs2}"
+ fi
+done
+# relaunch swaync
+sleep 0.5
+swaync > /dev/null 2>&1 &
-sleep 1
#Restart waybar
+sleep 1
waybar &
# Relaunching rainbow borders if the script exists
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage