Skip to content

Commit 25ac85d

Browse files
committed
auto-sync: [Mon Mar 16 04:52:51 PM -03 2026]
1 parent 31b24b5 commit 25ac85d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

waybar/.config/waybar/modules/WaybarAutoHide

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ touch "$AUTO_FILE"
5454
trap "bar_visible=false; pkill -SIGUSR2 waybar; bar_visible=true" SIGCONT
5555

5656
while true; do
57+
# Ensure waybar is running
58+
if ! pgrep -x "waybar" >/dev/null; then
59+
sleep 2
60+
continue
61+
fi
62+
5763
# Verify if Hyprland is reachable
5864
if ! timeout 0.5 hyprctl version >/dev/null 2>&1; then
5965
sleep 2
@@ -107,7 +113,6 @@ while true; do
107113
EDGE1=$(awk -v w="$WIDTH" 'BEGIN {printf "%d", w * 0.9}')
108114
EDGE2=$(awk -v w="$WIDTH" 'BEGIN {printf "%d", w * 0.99}')
109115
SHOW_CONDITION=$(( X >= EDGE2 ))
110-
HIDE_CONDITION=$(( X < EDGE1 ))
111116
;;
112117
*)
113118
EDGE1=$(awk -v h="$HEIGHT" 'BEGIN {printf "%d", h * 0.01}')

0 commit comments

Comments
 (0)