From b20e83cb8ad563b620a677920115695a00346e52 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Thu, 16 Mar 2017 21:04:24 +0100 Subject: [PATCH] [engine] Fix interval configuration Until now, manually specifying an interval did not work, as a cast to float was missing. Now, it's possible to specify an update interval in seconds via "-p interval=" fixes #54 --- README.md | 5 +++++ bumblebee/engine.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5b6a44..c5749cb 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,11 @@ $ ./bumblebee-status -l themes $ ./bumblebee-status -l modules ``` +To change the update interval, use: +``` +$ ./bumblebee-status -m -p interval= +``` + As a simple example, this is what my i3 configuration looks like: ``` diff --git a/bumblebee/engine.py b/bumblebee/engine.py index 67234fe..c0ea9cc 100644 --- a/bumblebee/engine.py +++ b/bumblebee/engine.py @@ -158,7 +158,7 @@ class Engine(object): self._output.flush() self._output.end() if self.running(): - self.input.wait(self._config.get("interval", 1)) + self.input.wait(float(self._config.get("interval", 1))) self._output.stop() self.input.stop()