From 61cdfffc0db2598deb49af1eea603ffcaa85a0b2 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Thu, 1 Jun 2023 15:10:47 -0400 Subject: [PATCH] Window list should now work for sway. --- scripts/window_list.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/window_list.sh b/scripts/window_list.sh index fc837da..bbcbf94 100755 --- a/scripts/window_list.sh +++ b/scripts/window_list.sh @@ -13,4 +13,11 @@ id="$(yad --title "I38" --list --separator "" --column "id" --column "Select Win if [[ -z "${id}" ]]; then exit 0 fi -i3-msg \[id="${id}"\] focus +path="$(readlink -f $0)" +path="${path%/*/*}" +path="${path##*/}" +if [[ "$path" == "i3" ]]; then + i3-msg \[id="${id}"\] focus +else + swaymsg \[id="${id}"\] focus +fi