summaryrefslogtreecommitdiff
path: root/.config/tmux/popup.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/tmux/popup.sh')
-rwxr-xr-x.config/tmux/popup.sh14
1 files changed, 2 insertions, 12 deletions
diff --git a/.config/tmux/popup.sh b/.config/tmux/popup.sh
index 15eed1a..7017cad 100755
--- a/.config/tmux/popup.sh
+++ b/.config/tmux/popup.sh
@@ -1,13 +1,3 @@
#!/bin/sh
-parent=$(tmux display-message -p "#{session_name}")
-popup="popup-$parent"
-
-if tmux has-session -t "$popup" 2>/dev/null; then
- tmux attach-session -t "$popup"
-else
- tmux new-session -s "$popup" \; \
- rename-window "build" \; \
- new-window -n "test" \; \
- new-window -n "repl" \; \
- select-window -t 1
-fi
+parent=$(tmux display-message -p '#S')
+tmux attach -t "popup-${parent}" 2>/dev/null || tmux new-session -s "popup-${parent}"