Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
loading thresholds state
[slstatus.git]
/
slstatus.c
diff --git
a/slstatus.c
b/slstatus.c
index
d29436d
..
90b4808
100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-140,6
+140,8
@@
battery_state(const char *bat)
return smprintf("-");
} else if (strcmp(state, "Full") == 0) {
return smprintf("=");
return smprintf("-");
} else if (strcmp(state, "Full") == 0) {
return smprintf("=");
+ } else if (strcmp(state, "Unknown") == 0) {
+ return smprintf("/");
} else {
return smprintf("?");
}
} else {
return smprintf("?");
}
@@
-329,6
+331,7
@@
keyboard_indicators(void)
Display *dpy = XOpenDisplay(NULL);
XKeyboardState state;
XGetKeyboardControl(dpy, &state);
Display *dpy = XOpenDisplay(NULL);
XKeyboardState state;
XGetKeyboardControl(dpy, &state);
+ XCloseDisplay(dpy);
switch (state.led_mask) {
case 1:
switch (state.led_mask) {
case 1:
@@
-343,8
+346,6
@@
keyboard_indicators(void)
default:
return smprintf("");
}
default:
return smprintf("");
}
-
- XCloseDisplay(dpy);
}
static char *
}
static char *