Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclamation Mark at dwmblock #115

Open
wohlersgit opened this issue Aug 2, 2023 · 1 comment
Open

Exclamation Mark at dwmblock #115

wohlersgit opened this issue Aug 2, 2023 · 1 comment

Comments

@wohlersgit
Copy link

wohlersgit commented Aug 2, 2023

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

@wohlersgit wohlersgit changed the title 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 Exclamation Mark at dwmblock Aug 2, 2023
@Ors1mer
Copy link

Ors1mer commented Jan 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants