This commit is contained in:
DarthMooMancer
2025-08-05 14:27:29 -04:00
parent 0331d4a1b0
commit 8738b54566
2 changed files with 5 additions and 8 deletions
+1 -3
View File
@@ -16,9 +16,7 @@ clean:
rm -f slstatus rm -f slstatus
install: all install: all
mkdir -p "$(DESTDIR)$(PREFIX)/bin" install -Dm755 slstatus "$(DESTDIR)$(PREFIX)/bin/slstatus"
cp -f slstatus "$(DESTDIR)$(PREFIX)/bin"
chmod 755 "$(DESTDIR)$(PREFIX)/bin/slstatus"
uninstall: uninstall:
rm -f "$(DESTDIR)$(PREFIX)/bin/slstatus" rm -f "$(DESTDIR)$(PREFIX)/bin/slstatus"
+4 -5
View File
@@ -31,7 +31,7 @@ static void terminate() {
done = 1; done = 1;
} }
const char* bg_timer(const char *_) { const char* bgt(const char *_) {
(void)_; (void)_;
static char buf[5]; static char buf[5];
time_t now = time(NULL), last = now; time_t now = time(NULL), last = now;
@@ -76,9 +76,9 @@ int main(int argc, char *argv[]) {
int ret; int ret;
char status[36]; char status[36];
static const struct arg args[] = { static const struct arg args[] = {
{ bg_timer, " W: %s · ", NULL }, { bgt, "W: %s · ", NULL },
{ vol, "V: %s · ", NULL }, { vol, "V: %s · ", NULL },
{ age, "A: %s / 731 ", NULL }, { age, "A: %sd", NULL },
}; };
memset(&act, 0, sizeof(act)); memset(&act, 0, sizeof(act));
@@ -105,7 +105,6 @@ int main(int argc, char *argv[]) {
nanosleep(&ts, NULL); nanosleep(&ts, NULL);
} }
} while (!done); } while (!done);
XStoreName(dpy, DefaultRootWindow(dpy), NULL); XStoreName(dpy, DefaultRootWindow(dpy), NULL);
if (XCloseDisplay(dpy) < 0) die("XCloseDisplay: Failed to close display"); if (XCloseDisplay(dpy) < 0) die("XCloseDisplay: Failed to close display");
return 0; return 0;