diff --git a/src/i3_instant_layout/main.py b/src/i3_instant_layout/main.py index 5b47a0d..31398c3 100644 --- a/src/i3_instant_layout/main.py +++ b/src/i3_instant_layout/main.py @@ -7,7 +7,7 @@ import sys import tempfile from pathlib import Path -from . import layouts +from . import layouts, __version__ counter_file = Path("~/.local/share/i3-instant-layout/counter.json").expanduser() @@ -63,7 +63,7 @@ def get_window_ids(): "--desktop", desktop, "--class", - "", + "^.*", ] ).decode("utf-8", errors="replace") return res.strip().split("\n") @@ -210,6 +210,9 @@ def main(): elif sys.argv[1] == "--desc": print_desc() sys.exit(0) + elif sys.argv[1] == "--version": + print(__version__) + sys.exit(0) elif sys.argv[1] == "--list": list_layouts_in_smart_order() sys.exit(0)