servers: id → dirname

This commit is contained in:
Marc Beninca 2025-07-25 23:57:07 +02:00
parent 69edbd40d7
commit 03b1198d2a
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -151,10 +151,9 @@ rwx_tmux_server() {
# return active & current servers socket names
rwx_tmux_servers() {
local active name root sockets text user_id
local active name root sockets text
active=\"\$(rwx_tmux_server)\"
user_id=\"\$(id -u)\"
root=\"/tmp/tmux-\${user_id}\"
root=\"\$(dirname \"\${TMUX}\")\"
sockets=\"\$(find \"\${root}\" -type s -printf \"%P\\n\")\"
while IFS= read -r name; do
if tmux -L \"\${name}\" list-sessions >/dev/null; then