LukeSmithxyz / dwmblocks

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

Update Signal != 1/0 prints an additional rectangle emoji in front #103

Closed dement6d closed 1 year ago

dement6d commented 2 years ago

the Update Signal part of config.h causes a rectangle to be rendered before the icon/output of a block i should also mention that the block click functions dont work for me but im not too familiar with that patch and if i need a corresponding patch for dwm as well for that to work, i dont have it

Heres a screenshot, changing the update signal to 1 fixed the issue for me image

dement6d commented 2 years ago

ill close this since its most likely an issue with dwmblocks itself, it happens with regular commands and not only scripts, sometimes i have to set the update signal to 0 to remove the box symbol too

dement6d commented 2 years ago

well i just tried regular dwmblocks and it seems like the issue only happens on this fork

ListeriaM commented 2 years ago

This is because you're not using the patch for dwm, so dwm tries to render the non-printable character corresponding to the signal number.

If you don't care about clickability you're better off with vanilla dwmblocks. Also possible is setting every signal number to 0 as you've noticed, here's why:

The following code from getcmd() sets the first character of the block to the signal number if it is not 0:

    if (block->signal)
    {
        output[0] = block->signal;
        output++;
    }