Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
5.83k stars 657 forks source link

add hide-empty-text option to hide module whenever output is empty but format is not #3395

Closed RobertMueller2 closed 2 days ago

RobertMueller2 commented 2 days ago

Resolves #3341

Custom module hides empty output, e.g. when a worker returns {} as json. But when using other content in the format, e.g. to add an icon before or after output, it's no longer possible to have the module hidden.

This PR addresses this by adding a config option hide-empty-text, when true, text_ is checked for empty rather than str.

I realise I forgot the manpage, coming up in a second :P

vikanezrimaya commented 2 days ago

Am the original reporter, tested this on my install, can confirm this resolves my issue.

Alexays commented 2 days ago

LGTM, thx