LukeSmithxyz / dwmblocks

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

Exclamation Mark at dwmblock #115

Open wohlersgit opened 1 year ago

wohlersgit commented 1 year ago

I use Larbs since a few weeks and everything works fine but today i wanted to add a dwm block (just a simple echo "some text" for testing) but on the statusbar there is always one exclamation mark before my text

Ors1mer commented 9 months ago

I had the same issue, but instead of an exclamation mark, there was a weird symbol at the beginning of every block. I used Luke's dwmblocks and a regular dwm with no patches.

I took a look into the dwmblocks.c and found this at the start of the getcmd function:

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

So, the weird symbol that gets printed is actually the signal number, which corresponds to a non-printable ASCII character.

Then I found out that the first byte (i.e. the signal number) of a block is used by dwm when the statuscmd patch is applied to make the block clickable.

So, there are three solutions: 1) Install the statuscmd with signals patch for dwm 2) Install Luke's fork of dwm that has that patch already 3) Comment out the mentioned lines of code (it also makes blocks unclickable if you install statuscmd in the future)

I chose the first option and don't have this problem anymore.

Perhaps it is worth mentioning in the readme that dwm with statuscmd is a dependency unless the user's okay with these symbols.