diff --git a/.config/suckless/slstatus/Makefile b/.config/suckless/slstatus/Makefile index 0d3983a..e21ba0c 100644 --- a/.config/suckless/slstatus/Makefile +++ b/.config/suckless/slstatus/Makefile @@ -16,9 +16,7 @@ clean: rm -f slstatus install: all - mkdir -p "$(DESTDIR)$(PREFIX)/bin" - cp -f slstatus "$(DESTDIR)$(PREFIX)/bin" - chmod 755 "$(DESTDIR)$(PREFIX)/bin/slstatus" + install -Dm755 slstatus "$(DESTDIR)$(PREFIX)/bin/slstatus" uninstall: rm -f "$(DESTDIR)$(PREFIX)/bin/slstatus" diff --git a/.config/suckless/slstatus/slstatus.c b/.config/suckless/slstatus/slstatus.c index 7008f0d..6b08954 100644 --- a/.config/suckless/slstatus/slstatus.c +++ b/.config/suckless/slstatus/slstatus.c @@ -31,7 +31,7 @@ static void terminate() { done = 1; } -const char* bg_timer(const char *_) { +const char* bgt(const char *_) { (void)_; static char buf[5]; time_t now = time(NULL), last = now; @@ -76,9 +76,9 @@ int main(int argc, char *argv[]) { int ret; char status[36]; static const struct arg args[] = { - { bg_timer, " W: %s · ", NULL }, - { vol, "V: %s · ", NULL }, - { age, "A: %s / 731 ", NULL }, + { bgt, "W: %s · ", NULL }, + { vol, "V: %s · ", NULL }, + { age, "A: %sd", NULL }, }; memset(&act, 0, sizeof(act)); @@ -105,7 +105,6 @@ int main(int argc, char *argv[]) { nanosleep(&ts, NULL); } } while (!done); - XStoreName(dpy, DefaultRootWindow(dpy), NULL); if (XCloseDisplay(dpy) < 0) die("XCloseDisplay: Failed to close display"); return 0;