diff options
author | Piotr Miller <nwg.piotr@gmail.com> | 2020-10-15 10:27:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-15 10:27:46 +0200 |
commit | 58de027b790d56515b202d4a26abe7fda9cd9dbc (patch) | |
tree | ba285f875e38304cff4384c21bfdedb3cbff33b6 | |
parent | 7cdfd0e61bc512cf863bfe1986b4c2e64b28c28f (diff) | |
parent | 616b2089e8fec55f610e03b0186ee90c48cdf49a (diff) | |
download | autotiling-58de027b790d56515b202d4a26abe7fda9cd9dbc.tar.gz |
Merge pull request #18 from Lqp1/master
Allow autotiling to be run manually again
-rw-r--r-- | autotiling/main.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/autotiling/main.py b/autotiling/main.py index f3644a7..3f6969e 100644 --- a/autotiling/main.py +++ b/autotiling/main.py @@ -18,7 +18,12 @@ from functools import partial from i3ipc import Connection, Event -from .__about__ import __version__ + +try: + from .__about__ import __version__ +except ImportError: + __version__ = "unknown" + def switch_splitting(i3, e, debug): @@ -84,3 +89,8 @@ def main(): i3 = Connection() i3.on(Event.WINDOW_FOCUS, handler) i3.main() + + +if __name__ == "__main__": + # execute only if run as a script + main() |