Skip to content

Commit 26865e4

Browse files
committed
auto-sync: [Thu Mar 19 10:21:39 PM -03 2026]
1 parent 848088d commit 26865e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

waybar/.config/waybar/modules/WaybarAutoHide

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ while true; do
113113
EDGE1=$(awk -v w="$WIDTH" 'BEGIN {printf "%d", w * 0.9}')
114114
EDGE2=$(awk -v w="$WIDTH" 'BEGIN {printf "%d", w * 0.99}')
115115
SHOW_CONDITION=$(( X >= EDGE2 ))
116+
HIDE_CONDITION=$(( X < EDGE1 ))
116117
;;
117118
*)
118119
EDGE1=$(awk -v h="$HEIGHT" 'BEGIN {printf "%d", h * 0.01}')
@@ -122,13 +123,13 @@ while true; do
122123
;;
123124
esac
124125

125-
if (( special || tiled==0 || (tiled>=1 && SHOW_CONDITION) )); then
126+
if (( special || SHOW_CONDITION )); then
126127
if ! $bar_visible; then
127128
pkill -SIGUSR2 waybar
128129
bar_visible=true
129130
touch "$AUTO_FILE"
130131
fi
131-
elif (( tiled>=1 && HIDE_CONDITION )); then
132+
elif (( HIDE_CONDITION || tiled == 0 )); then
132133
if $bar_visible; then
133134
pkill -SIGUSR1 waybar
134135
bar_visible=false
@@ -147,7 +148,7 @@ if [ -f "$STATE_FILE" ]; then
147148
rm "$STATE_FILE"
148149
tiled=$(get_tiled_on_active_ws)
149150

150-
if focused_special_ws || [ "$tiled" -eq 0 ]
151+
if focused_special_ws
151152
then
152153
pkill -SIGUSR2 waybar
153154
else

0 commit comments

Comments
 (0)