Xinqi Bao's Git
projects
/
slstatus.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(parent:
410ba38
)
add update_interval
author
Daniel Walter <
[email protected]
>
Thu, 10 Mar 2016 10:55:42 +0000
(11:55 +0100)
committer
Daniel Walter <
[email protected]
>
Thu, 10 Mar 2016 10:55:42 +0000
(11:55 +0100)
add a short sleep to reduce load
config.def.h
patch
|
blob
|
history
slstatus.c
patch
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
a6bba6f
..
afd0320
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-17,6
+17,9
@@
static const char batteryfullfile[] = "/sys/class/power_supply/BAT0/energy_full_
/* time */
static const char timeformat[] = "%y-%m-%d %H:%M:%S";
+/* bar update interval in seconds */
+static unsigned int update_interval = 10;
+
/* statusbar
Possible arguments:
- battery (battery percentage)
diff --git
a/slstatus.c
b/slstatus.c
index
214f667
..
658bc79
100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-343,6
+343,7
@@
main()
free(ram_usage);
free(volume);
free(wifi_signal);
+ sleep(update_interval);
}
/* close display */