From: Alexander Vasarab Date: Thu, 9 Jul 2020 21:22:15 +0000 (-0700) Subject: Implement 'auto-start in GUI' feature X-Git-Tag: v2.3.0^2~1 X-Git-Url: https://wylark.com/src/munter.git/commitdiff_plain/f2cda233e22a426cb5b657514da0a386d99b289e?ds=sidebyside;hp=f6c31e69611050e412aaec1fefda844469a231cb Implement 'auto-start in GUI' feature --- diff --git a/munter/munter.py b/munter/munter.py index 8efe665..062e676 100644 --- a/munter/munter.py +++ b/munter/munter.py @@ -183,6 +183,10 @@ def main(): fitness=fitness, rate=travel_mode, units=units) + # auto-start in GUI mode if the program is not invoked from terminal + if len(sys.argv) == 1 and not sys.stdin.isatty(): + gui = True + if gui: from . import gui gui.startup()