Allow auto-attaching tmux when connecting via ssh
This commit is contained in:
parent
ca4e381eb7
commit
a92ce69d39
|
@ -12,6 +12,10 @@
|
|||
home.username = "djm";
|
||||
home.homeDirectory = "/home/djm";
|
||||
|
||||
home.sessionVariables = {
|
||||
TMUX_AUTO_ATTACH=1;
|
||||
};
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
initExtra = ''
|
||||
# Taken from prezto tmux plugin
|
||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && -z "$SSH_TTY" ]]; then
|
||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && (-z "$SSH_TTY" || -n "$TMUX_AUTO_ATTACH") ]]; then
|
||||
tmux start-server
|
||||
|
||||
if ! tmux has-session 2> /dev/null; then
|
||||
|
|
Loading…
Reference in New Issue