aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts')
-rwxr-xr-xconfig/hypr/scripts/Refresh.sh31
1 files changed, 15 insertions, 16 deletions
diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh
index 1dd59752..76757aa4 100755
--- a/config/hypr/scripts/Refresh.sh
+++ b/config/hypr/scripts/Refresh.sh
@@ -7,27 +7,26 @@ UserScripts=$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
+ if [ -e "$1" ]; then
+ return 0 # File exists
+ else
+ return 1 # File does not exist
+ fi
}
# Kill already running processes
_ps=(waybar rofi swaync ags)
for _prs in "${_ps[@]}"; do
- if pidof "${_prs}" >/dev/null; then
- pkill "${_prs}"
- fi
+ if pidof "${_prs}" >/dev/null; then
+ pkill "${_prs}"
+ fi
done
# added since wallust sometimes not applying
-killall -SIGUSR2 waybar
+killall -SIGUSR2 waybar
# Added sleep for GameMode causing multiple waybar
sleep 0.1
-
# quit ags & relaunch ags
#ags -q && ags &
@@ -36,24 +35,24 @@ sleep 0.1
# some process to kill
for pid in $(pidof waybar rofi swaync ags swaybg); do
- kill -SIGUSR1 "$pid"
- sleep 0.3
+ kill -SIGUSR1 "$pid"
+ sleep 0.1
done
#Restart waybar
-sleep 1
+sleep 0.1
waybar &
# relaunch swaync
-sleep 0.5
-swaync > /dev/null 2>&1 &
+sleep 0.3
+swaync >/dev/null 2>&1 &
# reload swaync
swaync-client --reload-config
# Relaunching rainbow borders if the script exists
sleep 1
if file_exists "${UserScripts}/RainbowBorders.sh"; then
- ${UserScripts}/RainbowBorders.sh &
+ ${UserScripts}/RainbowBorders.sh &
fi
exit 0
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage