slstatus

My fork of https://tools.suckless.org/slstatus/
git clone https://git.inz.fi/slstatus
Log | Files | Refs | README | LICENSE

commit 5295629c4fe987ee51fcfdd380c86e3e0d5de5b5
parent 410ba38a0160da8cbcc81dddd704ae9c7f6d15e2
Author: Daniel Walter <d.walter@0x90.at>
Date:   Thu, 10 Mar 2016 11:55:42 +0100

add update_interval

add a short sleep to reduce load

Diffstat:
Mconfig.def.h | 3+++
Mslstatus.c | 1+
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git 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 @@ -343,6 +343,7 @@ main() free(ram_usage); free(volume); free(wifi_signal); + sleep(update_interval); } /* close display */