wip
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user