summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-01-29 19:30:39 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2025-01-29 19:30:39 +0100
commitedaaa0b3c00322483e42d80a70b34b09527297d5 (patch)
tree3af4d42d55a1263f009d142d293d18c7db0d2396
parent44952654e8ed60c6189d6ff49789d678e5bea382 (diff)
downloadnixos-edaaa0b3c00322483e42d80a70b34b09527297d5.tar
nixos-edaaa0b3c00322483e42d80a70b34b09527297d5.tar.gz
nixos-edaaa0b3c00322483e42d80a70b34b09527297d5.tar.bz2
nixos-edaaa0b3c00322483e42d80a70b34b09527297d5.tar.xz
nixos-edaaa0b3c00322483e42d80a70b34b09527297d5.zip
...
-rw-r--r--accounts/gkleen@sif/niri/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix
index ca2dfeff..7e187c84 100644
--- a/accounts/gkleen@sif/niri/default.nix
+++ b/accounts/gkleen@sif/niri/default.nix
@@ -28,7 +28,11 @@ let
28 28
29 while IFS=$'\n' read -r window_json; do 29 while IFS=$'\n' read -r window_json; do
30 if [[ -n $(jq -c "$window_select" <<<"$window_json") ]]; then 30 if [[ -n $(jq -c "$window_select" <<<"$window_json") ]]; then
31 niri msg action focus-window --id "$(jq -r '.id' <<<"$window_json")" 31 if jq -e '.is_focused' <<<"$window_json" >/dev/null; then
32 niri msg action focus-workspace-previous
33 else
34 niri msg action focus-window --id "$(jq -r '.id' <<<"$window_json")"
35 fi
32 exit 0 36 exit 0
33 fi 37 fi
34 done < <(niri msg -j windows | jq -c '.[]') 38 done < <(niri msg -j windows | jq -c '.[]')