Merged. Thanks!

On 20-06-18 Thu, Mart Lubbers wrote:
At some point one might want to force a refresh for example after
checking email or changing the volume. Sending a SIGUSR1 achieves this
now
---
slstatus.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/slstatus.c b/slstatus.c
index 96fa5b6..499cd30 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -26,9 +26,8 @@ static Display *dpy;
static void
terminate(const int signo)
{
-       (void)signo;
-
-       done = 1;
+       if (signo != SIGUSR1)
+               done = 1;
}

static void
@@ -72,6 +71,7 @@ main(int argc, char *argv[])
       act.sa_handler = terminate;
       sigaction(SIGINT,  &act, NULL);
       sigaction(SIGTERM, &act, NULL);
+       sigaction(SIGUSR1, &act, NULL);

       if (!sflag && !(dpy = XOpenDisplay(NULL))) {
               die("XOpenDisplay: Failed to open display");
--
2.20.1



--
Web: https://drkhsh.at/ or http://drkhsh5rv6pnahas.onion/
GPG: 0x7A65E38D55BE96FE
Fingerprint: 4688 907C 8720 3318 0D9F AFDE 7A65 E38D 55BE 96FE

Reply via email to