Preventing empty overflow
This commit is contained in:
@@ -114,20 +114,14 @@ if [[ "${1:-}" == "--pick" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Status JSON for Waybar
|
if (( overflow == 0 )) || [[ "$layout" != "scrolling" ]]; then
|
||||||
# Make it ALWAYS visible so you can hover to see the list.
|
|
||||||
# Show +N only when overflow AND layout==scrolling, keeping your original intent.
|
|
||||||
text="$ICON"
|
|
||||||
cls="ok"
|
|
||||||
if (( overflow > 0 )) && [[ "$layout" == "scrolling" ]]; then
|
|
||||||
text="$ICON +$overflow"
|
|
||||||
cls="overflow"
|
|
||||||
elif (( overflow == 0 )) || [[ "$layout" != "scrolling" ]]; then
|
|
||||||
# Tell Waybar to hide the module
|
|
||||||
printf '{"text":""}\n'
|
printf '{"text":""}\n'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
text="$ICON +$overflow"
|
||||||
|
cls="overflow"
|
||||||
|
|
||||||
tooltip="WS ${focused_ws_id} • ${win_count} window(s)\n"
|
tooltip="WS ${focused_ws_id} • ${win_count} window(s)\n"
|
||||||
tooltip+="Approx ${max_visible} fit (column_width=${COLUMN_WIDTH})\n"
|
tooltip+="Approx ${max_visible} fit (column_width=${COLUMN_WIDTH})\n"
|
||||||
tooltip+="------------------------------\n"
|
tooltip+="------------------------------\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user