From e847cbde732f81344c7c24cd272dabb43163ad23 Mon Sep 17 00:00:00 2001 From: server2 Date: Thu, 8 Oct 2026 01:25:33 +0200 Subject: [PATCH] tools: pick the live hyprland instance $XDG_RUNTIME_DIR/hypr keeps folders of dead instances, and the newest one isn't always alive; take the newest with a .socket.sock --- tools/amane-remote.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/amane-remote.sh b/tools/amane-remote.sh index 45c0bb6..459dc20 100755 --- a/tools/amane-remote.sh +++ b/tools/amane-remote.sh @@ -27,7 +27,7 @@ session='uid=$(id -u) export XDG_RUNTIME_DIR=/run/user/$uid export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus export WAYLAND_DISPLAY=$(ls "$XDG_RUNTIME_DIR" | grep -m1 -x "wayland-[0-9]*") -export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t "$XDG_RUNTIME_DIR/hypr" 2>/dev/null | head -1) +export HYPRLAND_INSTANCE_SIGNATURE=$(cd "$XDG_RUNTIME_DIR/hypr" 2>/dev/null && for d in $(ls -t); do [ -S "$d/.socket.sock" ] && echo "$d" && break; done) export PATH=$HOME/.cargo/bin:$PATH mkdir -p '"$work"' && cd '"$work"' '