aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/RefreshNoWaybar.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts/RefreshNoWaybar.sh')
-rwxr-xr-xconfig/hypr/scripts/RefreshNoWaybar.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh
index 9f3d92ca..d42a39db 100755
--- a/config/hypr/scripts/RefreshNoWaybar.sh
+++ b/config/hypr/scripts/RefreshNoWaybar.sh
@@ -41,11 +41,21 @@ pkill qs && qs --log-rules "$QS_TEXTINPUT_LOG_RULE" &
# reload swaync
swaync-client --reload-config
-# Relaunching rainbow borders if the script exists
+# Relaunching rainbow borders based on selected mode
sleep 1
-if file_exists "${UserScripts}/RainbowBorders.sh"; then
- ${UserScripts}/RainbowBorders.sh &
+rainbow_mode_file="${UserScripts}/rainbow-borders.mode"
+rainbow_mode=""
+if [[ -f "$rainbow_mode_file" ]]; then
+ rainbow_mode="$(tr -d '[:space:]' <"$rainbow_mode_file")"
+fi
+if [[ "$rainbow_mode" == "low_cpu" ]]; then
+ pkill -f 'RainbowBorders-low-cpu\.sh' >/dev/null 2>&1 || true
+ rm -f /tmp/hypr-rainbowborders.lock >/dev/null 2>&1 || true
+ if file_exists "${UserScripts}/RainbowBorders-low-cpu.sh"; then
+ "${UserScripts}/RainbowBorders-low-cpu.sh" >/dev/null 2>&1 &
+ fi
+elif file_exists "${UserScripts}/RainbowBorders.sh"; then
+ "${UserScripts}/RainbowBorders.sh" &
fi
-
-exit 0 \ No newline at end of file
+exit 0
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage