diff options
| author | Ja.KooLit <ejhay.games@gmail.com> | 2023-12-29 00:41:08 +0900 |
|---|---|---|
| committer | Ja.KooLit <ejhay.games@gmail.com> | 2023-12-29 00:41:08 +0900 |
| commit | f0771edf369d3ea51e3322acb9a5baa456f732b1 (patch) | |
| tree | 96a01b7586d716c03f73380ac22e46a241eb8266 /config/hypr/scripts/Refresh.sh | |
| parent | 9bf8a87dfa62865111c94e97a9abafcb529e52ed (diff) | |
Re-Structured Hypr Folder in preparation for Updates Scripts
Diffstat (limited to 'config/hypr/scripts/Refresh.sh')
| -rwxr-xr-x | config/hypr/scripts/Refresh.sh | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index 52f7e642..b5e0f556 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -1,6 +1,16 @@ #!/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 swaync) @@ -18,9 +28,13 @@ waybar & 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 |
