projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
410ba38
)
add update_interval
author
Daniel Walter
<d.walter@0x90.at>
Thu, 10 Mar 2016 10:55:42 +0000
(11:55 +0100)
committer
Daniel Walter
<d.walter@0x90.at>
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 a6bba6fbee6aa13ce04e3a25078ff2ed6f56b2c0..afd03204096fb526992847ee69253773a51d10ff 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 214f66712c760b43dcfe052620be360133b86f49..658bc7958f6fcdfc619e05c81926dbe768f784b0 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 */