start tmux at the end

This commit is contained in:
Jakobus Schürz 2020-11-30 08:03:36 +01:00
parent 7c67b44095
commit 60bf5bf467
2 changed files with 7 additions and 1 deletions

View file

@ -12,6 +12,9 @@
# set SSHS to false, if not set # set SSHS to false, if not set
[ -z ${SSHS+x} ] && export SSHS=false [ -z ${SSHS+x} ] && export SSHS=false
# set STARTTMUX to false, if not set
[ -z ${STARTTMUXDEFAULT+x} ] && export STARTTMUXDEFAULT=false
# check if we are a interactive shell # check if we are a interactive shell
# https://guide.bash.academy/expansions/ # https://guide.bash.academy/expansions/
# https://www.tldp.org/LDP/abs/html/refcards.html#AEN22473 # https://www.tldp.org/LDP/abs/html/refcards.html#AEN22473
@ -174,6 +177,7 @@ EOF
promptcommandmunge "_umask_hook" promptcommandmunge "_umask_hook"
which direnv >/dev/null && eval "$(direnv hook bash)" which direnv >/dev/null && eval "$(direnv hook bash)"
${STARTTMUX-$STARTTMUXDEFAULT} && tmux attach-session
cat << EOF >> "${MYSHELLCONFIG_LOGFILE}" cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
==8<=== finished configure new shell ================ $(date) ===============8<== ==8<=== finished configure new shell ================ $(date) ===============8<==

View file

@ -90,7 +90,8 @@ Press CTRL+C to cancel screen startup
EOF EOF
sleep 1 sleep 1
#screen -UxR #screen -UxR
tmux attach-session & #tmux attach-session
STARTTMUX=true
fi fi
unset -f pathmunge unset -f pathmunge
@ -146,6 +147,7 @@ export -f reachable-default
[ -z "${SSH_AGENTS_DEFAULT_DIR+x}" ] || mkdir -p "${SSH_AGENTS_DEFAULT_DIR}" [ -z "${SSH_AGENTS_DEFAULT_DIR+x}" ] || mkdir -p "${SSH_AGENTS_DEFAULT_DIR}"
#cat << EOF > "${SSH_AGENTS_DEFAULT_DIR}/agent-default-$(hostname)" #cat << EOF > "${SSH_AGENTS_DEFAULT_DIR}/agent-default-$(hostname)"
#SSH_AUTH_SOCK=${SSH_AUTH_SOCK}; export SSH_AUTH_SOCK; #SSH_AUTH_SOCK=${SSH_AUTH_SOCK}; export SSH_AUTH_SOCK;
#SSH_AGENT_PID=${SSH_AGENT_PID}; export SSH_AGENT_PID; #SSH_AGENT_PID=${SSH_AGENT_PID}; export SSH_AGENT_PID;