This prevents problems when X11 crashes or the network connection is lost on
remote servers.
}
+# RUN COMMANDS
+
+# If not already in screen reattach to a running session or create a new one.
+if [[ $TERM != 'screen' && $TERM != 'dumb' ]]; then
+ # Create a new session if none is running.
+ if [[ $(screen -list | grep "Detached" | wc -l) == 0 ]]; then
+ screen
+ # Reattach to a running session.
+ else
+ screen -r
+ fi
+fi
+
+
# Load rc file for current OS.
source_config ~/.zsh os rc $(uname) nolocal
# Load rc file for current hostname (first part before a dot) or rc.local.