1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-06-20 08:08:34 +02:00
dotfiles/extras/automatic_tmux_login.sh
bretello 7efeedf6d9
add extras folder
just miscellaneous script/configs that could be useful
2023-09-15 00:35:36 +02:00

11 lines
256 B
Bash

#_tmux_sourced=1 exec tmux
if [[ -z $TMUX ]] && [[ -n $SSH_TTY ]]; then
session=tmux
if tmux has-session -t "$session" 2>/dev/null; then
exec tmux attach-session -t "$session"
else
exec tmux new-session -s "$session"
fi
fi