You are not logged in.
Hi guys! I recently installed BATSIGNAL. but it is kind of hard to use as when I use the command
batsignal -f 100 -p -n BAT1 -P sigma (ignore the sigma that's just for testing. no notification appears when discharging or charging, can someone tell me what I did wrong
Edit: Batsignal seems to be broken
Solution: set batsignal interval to 5 sec
Last edited by Omarz2012 (2025-08-11 22:52:44)
Offline
Do you run a notification daemon?
notify-send sigmaOnline
Do you run a notification daemon?
notify-send sigma
yes I run dunst
Offline
The question is whetehr notify-send shows you a notification out of the same context where batsignal does not.
Online
The question is whetehr notify-send shows you a notification out of the same context where batsignal does not.
noitfy-send works without a problem and also when I was testing I got one notification from batsignal about discharging before it going back to being broken
Offline
update, trying to compile from source gives the error
cc -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Os -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -O1 -c -o main.o main.c
main.c: In function ‘main’:
main.c:133:19: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
133 | signal(SIGTERM, signal_handler);
| ^~~~~~~~~~~~~~
| |
| void (*)(void)
In file included from main.c:21:
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
| ~~~~~~~~~~~~~~~^~~~~~~~~
main.c:85:6: note: ‘signal_handler’ declared here
85 | void signal_handler()
| ^~~~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
72 | typedef void (*__sighandler_t) (int);
| ^~~~~~~~~~~~~~
main.c:134:18: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
134 | signal(SIGINT, signal_handler);
| ^~~~~~~~~~~~~~
| |
| void (*)(void)
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’
88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
| ~~~~~~~~~~~~~~~^~~~~~~~~
main.c:85:6: note: ‘signal_handler’ declared here
85 | void signal_handler()
| ^~~~~~~~~~~~~~
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
72 | typedef void (*__sighandler_t) (int);
| ^~~~~~~~~~~~~~
make: *** [<builtin>: main.o] Error 1Offline
Do you actually trigger changes and does "acpi -i" reflect them?
Does "batsignal -o" work?
nb that apparently by default it polls the battery every 60s - did you wait that long?
Online
Do you actually trigger changes and does "acpi -i" reflect them?
Does "batsignal -o" work?
nb that apparently by default it polls the battery every 60s - did you wait that long?
yup that was the solution, although can I make it that a change in charging status sends SIGUSR1
Offline
yup that was the solution
Batsignal seems to be broken
Err… what?
What is broken and what was the solution??
Online
yup that was the solution
your OP edit wrote:Batsignal seems to be broken
Err… what?
What is broken and what was the solution??
broken by source code not compiling and solution was the check time
Offline
Ah, ok.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
See https://github.com/electrickite/batsign … main.c#L85 ?
That needs to be "void signal_handler(int)" but there may be more problems: https://github.com/electrickite/batsignal/issues/43
This has nothing to do w/ the behavior, though - just some non-standard-compliant code patterns recent compilers will be picker about.
The arch package hasn't be rebuilt since a year (and back then likely still used older, more lenient versions of gcc)
Online