From fa6c79556ff9b243fdf37f0722babb972442be28 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Mon, 15 Oct 2012 11:22:46 +0300 Subject: [PATCH] tmiii: conform to latest tmux changes --- tmiii.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmiii.sh b/tmiii.sh index b7eeb78..741a0c9 100755 --- a/tmiii.sh +++ b/tmiii.sh @@ -12,7 +12,7 @@ opts="TERM="${t:-rxvt-unicode}" m="$m" h="$h" r=$r u="$u" l="$l" i="$i" n="$n" c ## spawn a new tmux window named in a tmux session named IRC if ! tmux list-sessions | awk -v r=1 '$1 == "IRC:" { exit r=0 } END { exit r }' then urxvtc -name "IRC-tmux" -e tmux new-session -s IRC -n "${c:-$n}" "$opts iii.sh" -elif ! tmux list-windows -t IRC | awk -v r=1 -v m="${c:-$n}" '$2 == m { print $2; exit r=0 } END { exit r }' +elif ! tmux list-windows -t IRC | awk -v r=1 -v m="${c:-$n}" '$2 ~ "^"m"[*!-]*$" { print $2; exit r=0 } END { exit r }' then tmux new-window -t IRC -n "${c:-$n}" -d "$opts iii.sh" fi