batsignal icon indicating copy to clipboard operation
batsignal copied to clipboard

[wayland] [mako] limit notification to one for a given level

Open ilan-schemoul opened this issue 2 years ago • 5 comments

Hello, Is it possible to only shows one time a given message (e.g : you have 18% left) instead of having tens of notifcation during all the time I have a given percent (e.g : I have set the critical level to 18% I want to have one notifiation for 18% not 1 per second during all the time my computer has 18%) I use wayland with mako to shows notification

ilan-schemoul avatar Oct 23 '22 14:10 ilan-schemoul

batsignal should not perform a battery check or send notification more that once per the minimum interval set by the multiplier option (by default 60 seconds). Are you seeing notifications every second without setting the multiplier option?

The current intended behavior of the critical level is indeed to create new notifications once every interval. The critical level represents the battery level at which immediate action must be taken by the user (i.e. to avoid automatic system shutdown). The warning level does work as you describe, and only shows a single notification when the system crosses the warning level threshold.

electrickite avatar Oct 24 '22 14:10 electrickite

It is not every minute but more like every 1 or 2 seconds. This issue did not happen when I was using X11 it's specific to wayland

ilan-schemoul avatar Oct 24 '22 21:10 ilan-schemoul

Interesting - batsignal has no graphical functionality, so the window manager should not matter. Can you post the batsignal command you are using, along with your Mako config?

electrickite avatar Oct 24 '22 21:10 electrickite

In my sway

exec --no-startup-id batsignal -w 25 -c 18 -d 13 -f 0 -b
exec --no-startup-id mako

No further config I'm using arch linux by the way

ilan-schemoul avatar Oct 25 '22 13:10 ilan-schemoul

@ilan-schemoul Version 1.7.0 adds support for closing notifications and using only one notification at a time for batsignal. Does this resolve the issue?

electrickite avatar Jan 03 '24 19:01 electrickite