Preventing empty overflow
This commit is contained in:
@@ -114,20 +114,14 @@ if [[ "${1:-}" == "--pick" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Status JSON for Waybar
|
||||
# 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
|
||||
if (( overflow == 0 )) || [[ "$layout" != "scrolling" ]]; then
|
||||
printf '{"text":""}\n'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
text="$ICON +$overflow"
|
||||
cls="overflow"
|
||||
|
||||
tooltip="WS ${focused_ws_id} • ${win_count} window(s)\n"
|
||||
tooltip+="Approx ${max_visible} fit (column_width=${COLUMN_WIDTH})\n"
|
||||
tooltip+="------------------------------\n"
|
||||
|
||||
Reference in New Issue
Block a user