LukeSmithxyz / dwmblocks

My status bar: my build of the modular dwmblocks
GNU General Public License v2.0
430 stars 368 forks source link

Don't print anything for the current block if command doesn't return any text #111

Closed speedie1337 closed 1 year ago

speedie1337 commented 1 year ago

Don't know if this is something you will find useful, as it seems the icon is empty for all your blocks anyway, but this PR simply makes sure the icon doesn't get printed if there's no command alongside it.

Have tested this and it seems to work perfectly. I'm also using it in my own build where I originally implemented it. I decided to create this pull request since you may find it useful.

You can of course also toggle this feature through changing the value of hideemptyblock. Let me know if there are issues with this, but I haven't been able to find any!

LukeSmithxyz commented 1 year ago

I think there are some case where people might want the icons to retain a clickable element. I see your side as well, but I'd rather not specify one over the other, since as you said, I don't even use icons myself.