From 2330bde957296aad6ecc14140ebe1e2df3d6905c Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 16 Mar 2024 19:01:01 -0400 Subject: [PATCH] pass_typer: Improve matching of destination (still doesn't handle command) --- .config/i3/pass_typer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/i3/pass_typer.py b/.config/i3/pass_typer.py index 0a52e7a..d962ee5 100755 --- a/.config/i3/pass_typer.py +++ b/.config/i3/pass_typer.py @@ -129,7 +129,9 @@ def select_and_type(server_match: ServerMatch) -> None: window_name = cmd(["xdotool", "getactivewindow", "getwindowname"]).stdout.strip() -ssh_match = re.search(":([^ ]+=[^ ]* )*(mosh|ssh) (?P.*)", window_name) +ssh_match = re.search( + ":([^ ]+=[^ ]* )*(mosh|ssh) .* (?P[^ ]*)$", window_name +) if ssh_match: server_match = ServerMatch.from_destination(ssh_match.group("destination"))