From 2f38aad0e7c748677e91e899eb17c26585fed074 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Mon, 31 Oct 2016 12:18:18 +0100 Subject: [PATCH] [main] Make update interval configurable Commandline switch "-i|--interval" to specify the update interval. --- i3bumblebee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i3bumblebee b/i3bumblebee index 35f03b5..ca966e9 100755 --- a/i3bumblebee +++ b/i3bumblebee @@ -16,6 +16,7 @@ def main(): parser.add_argument("-m", "--modules", nargs="+", help="List of modules to load. The order of the list determines their order in the i3bar (from left to right)") parser.add_argument("-l", "--list", action="store_true", help="List all available modules and themes") parser.add_argument("-t", "--theme", help="Specify which theme to use for drawing the modulemoduless") + parser.add_argument("-i", "--interval", help="Specify the update interaval", default=1, type=int) args = parser.parse_args() @@ -45,7 +46,7 @@ def main(): theme.next() print output.get() sys.stdout.flush() - time.sleep(1) + time.sleep(args.interval) print output.stop()