diff --git a/sh/tmux.sh b/sh/tmux.sh index 4a83682..e2961eb 100644 --- a/sh/tmux.sh +++ b/sh/tmux.sh @@ -54,12 +54,13 @@ rwx_tmux_server() { --fields \"1\" } rwx_tmux_servers() { - local active name root sockets text + local active name root sockets text user_id active=\"\$(rwx_tmux_server)\" - root=\"/tmp/tmux-\$(id -u)\" + user_id=\"\$(id -u)\" + root=\"/tmp/tmux-\${user_id}\" sockets=\"\$(find \"\${root}\" -type s -printf \"%P\\n\")\" while IFS= read -r name; do - if tmux -L \"\${name}\" list-sessions; then + if tmux -L \"\${name}\" list-sessions >/dev/null; then text=\"\${text}\\ #[fg=default]\\ #[bg=default] \\