aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/Refresh.sh
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2023-12-29 15:44:57 +0900
committerGitHub <noreply@github.com>2023-12-29 15:44:57 +0900
commit2c070b5bfb2de84abed8a4cd45e999999021db38 (patch)
treeab297f40d72eab1dad7506e005cec1654f942ff6 /config/hypr/scripts/Refresh.sh
parent76672ae5a6ac03c416bc705d51dec363f88b7a40 (diff)
parent69772de8b00a85a7da8e3d56c802fcfd01affe1c (diff)
Merge pull request #106 from JaKooLit/development
Development to Main for v2.2.2 Changes
Diffstat (limited to 'config/hypr/scripts/Refresh.sh')
-rwxr-xr-xconfig/hypr/scripts/Refresh.sh30
1 files changed, 22 insertions, 8 deletions
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh
index 0d91de8d..b5e0f556 100755
--- a/config/hypr/scripts/Refresh.sh
+++ b/config/hypr/scripts/Refresh.sh
@@ -1,26 +1,40 @@
#!/usr/bin/env bash
SCRIPTSDIR=$HOME/.config/hypr/scripts
+UserSCRIPTSDIR=$HOME/.config/hypr/UserScripts
+
+# Define file_exists function
+file_exists() {
+ if [ -e "$1" ]; then
+ return 0 # File exists
+ else
+ return 1 # File does not exist
+ fi
+}
# Kill already running processes
-_ps=(waybar rofi)
+_ps=(waybar rofi swaync)
for _prs in "${_ps[@]}"; do
if pidof "${_prs}" >/dev/null; then
pkill "${_prs}"
fi
done
-sleep 0.1
+sleep 0.3
# Relaunch waybar
waybar &
-sleep 0.1
-# Relaunch dunst with pywal-borders
-${SCRIPTSDIR}/PywalDunst.sh &
+# relaunch swaync
+sleep 0.5
+swaync > /dev/null 2>&1 &
-# Relaunching rainbow borders
+# Relaunching rainbow borders if the script exists
sleep 1
-${SCRIPTSDIR}/RainbowBorders.sh &
+if file_exists "${UserSCRIPTSDIR}/RainbowBorders.sh"; then
+ ${UserSCRIPTSDIR}/RainbowBorders.sh &
+fi
# for cava-pywal (note, need to manually restart cava once wallpaper changes)
-ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true \ No newline at end of file
+ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
+
+exit 0 \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage