aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--%HOME%/.bashrc8
1 files changed, 7 insertions, 1 deletions
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc
index a00285d..38bac50 100644
--- a/%HOME%/.bashrc
+++ b/%HOME%/.bashrc
@@ -191,7 +191,13 @@ elif multiplexed; then
# Skip, we're already running a multiplexer.
true
elif command -v tmux &> /dev/null; then
- exec tmux new -A -s main
+ # On a remote terminal, always connect to the same session; on a local
+ # terminal, create a new one every time a new terminal is opened.
+ if remote_terminal; then
+ exec tmux new -A -s main
+ elif local_terminal; then
+ exec tmux new
+ fi
fi
# Disable Alt+N shortcuts, which I use in tmux: