From 8c3e49c70306826dc69a889cbd44c1ab610419b1 Mon Sep 17 00:00:00 2001 From: Florian Finkernagel Date: Mon, 12 Apr 2021 11:36:39 +0200 Subject: [PATCH] fix #10, openbsd compability --- src/i3_instant_layout/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)