commit be9bb49baf1a679fefa78c5820fc6e115d98e716
parent 682255ff81324d1bf644ee5a65bf2adf87114263
Author: Jake Bauer <jbauer@paritybit.ca>
Date: Wed, 24 Jun 2020 12:35:48 -0400
Fix tmux starting on tty1
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.bashrc b/.bashrc
@@ -78,12 +78,14 @@ if ! shopt -oq posix; then
fi
# Start tmux automatically (or attach to existing session) if:
-# 1. this is an interactive shell
+# 1. This is an interactive shell
# 2. TERM variable does not indicate we are in a screen or tmux session already
# 3. The environment variable TMUX is not set
+# 4. We are not on /dev/tty1 to allow X to start
if [ -n "$PS1" ] &&
[ ! "$TERM" = "screen" ] &&
[ ! "$TERM" = "tmux" ] &&
- [ -z "$TMUX" ]; then
+ [ -z "$TMUX" ] &&
+ [ $(tty) != "/dev/tty1" ]; then
exec tmux
fi