ashish-yadav11 / dwmblocks

Rewrite of dwmblocks with added features including clickability, cursor hinting and color.
ISC License
212 stars 30 forks source link

A block is not clickable if it's signal is 0 #10

Closed mastopgunaf closed 4 years ago

mastopgunaf commented 4 years ago

A comment in blocks.h says:

 * Set signal to 0 if signalling is not required for the block.

However, if I have a block that doesn't require signaling, but is clickable and updated through an interval, it requires a unique signal number, otherwise it becomes non-clickable.

For example, this block wouldn't be clickable:

{ PATH("cpu.sh"),               PATH("cpu_click.sh"),                   1,              0 }

But this block will be:

{ PATH("cpu.sh"),               PATH("cpu_click.sh"),                   1,              2 }
ashish-yadav11 commented 4 years ago

The way clickabity works is dwm signals dwmblocks to update the block on clicks by using its signal number (which is written in a char before the block output). If you don't keep a signal value for the block how can dwm signal dwmblocks to update a block. I am going to state the comment more clearly but nothing more can be done.

mastopgunaf commented 4 years ago

The way clickabity works is dwm signals dwmblocks to update the block on clicks by using its signal number (which is written in a char before the block output). If you don't keep a signal value for the block how can dwm signal dwmblocks to update a block. I am going to state the comment more clearly but nothing more can be done.

Oh, that's what I was thinking. Well, thanks regardless!

ashish-yadav11 commented 4 years ago

My bad, I rushed through your message.