summaryrefslogtreecommitdiff
path: root/bin/dmenu
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2024-10-25 19:39:33 +0900
committerA Farzat <a@farzat.xyz>2024-11-07 19:39:33 +0900
commit0e62ff2b752b742081084a6af05caabce044559a (patch)
tree8d80dce01aa87de8831cfcb6585463fb908802aa /bin/dmenu
parentd6a9fcfe0d59c35c8c2338c61f0cbad4bbe4f5ab (diff)
downloaddotfiles-0e62ff2b752b742081084a6af05caabce044559a.tar.gz
dotfiles-0e62ff2b752b742081084a6af05caabce044559a.zip
Simplify terminal_tmux script
Diffstat (limited to 'bin/dmenu')
-rwxr-xr-xbin/dmenu/terminal_tmux8
1 files changed, 1 insertions, 7 deletions
diff --git a/bin/dmenu/terminal_tmux b/bin/dmenu/terminal_tmux
index 550167f..a341349 100755
--- a/bin/dmenu/terminal_tmux
+++ b/bin/dmenu/terminal_tmux
@@ -14,10 +14,4 @@ else
chosen="$(tmux list-sessions -F \#\{session_name\} | dmenu -p "Choose which tmux session to use")"
fi
-[ -z "$chosen" ] && exit
-
-if tmux has-session -t "$chosen"; then
- exec $TERMINAL -T "tmux: $chosen" zshrc tmux attach -t "$chosen"
-else
- exec $TERMINAL -T "tmux: $chosen" zshrc tmux new -s "$chosen"
-fi
+[ -z "$chosen" ] || exec $TERMINAL -T "tmux: $chosen" zshrc tmux new -A -s "$chosen"