UtkarshVerma / dwmblocks-async

An efficient, lean, and asynchronous status feed generator for dwm.
GNU General Public License v2.0
224 stars 87 forks source link

I Cannot Seem to Set the Update Interval to Less than a Second #27

Closed amarakon closed 2 years ago

amarakon commented 2 years ago

I tried to set the update interval to a millisecond:

#define CMDLENGTH 45
#define DELIMITER " "
#define CLICKABLE_BLOCKS

const Block blocks[] = {
    BLOCK("sb-volume_input",    0.001, 17),
    BLOCK("sb-volume_output",    0.001, 18),
};

But it caused it to not update at all.

explosion-mental commented 2 years ago

floating numbers aren't supported. the interval value represents how many seconds, without any decimals. (C will replace this as bare 0 btw, because it's expecting an int(unsigned) )

amarakon commented 2 years ago

So does that mean that it is not possible to set the update interval to less than a second? If that is so, can I make it so that my volume scripts update every time I change the volume?

explosion-mental commented 2 years ago

ye with signals, kill(1) read: https://github.com/UtkarshVerma/dwmblocks-async#signalling-changes

amarakon commented 2 years ago

That's excellent. That is a great way to have my volume update instantly and efficiently, thanks!