diff --git a/bash/.bashrc b/bash/.bashrc index fb147ee..7798a50 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -73,9 +73,9 @@ md() { } # Automatically run tmux if we aren't already in a session and there's no matching session already running -if [[ -z "$TMUX" ]] && ! tmux list-sessions | grep --quiet "$HOSTNAME"; then +if [[ -z "$TMUX" ]] && ! tmux list-sessions 2>/dev/null | grep --quiet "$HOSTNAME"; then tmux new -s "$HOSTNAME" fi -# AUtomatically run X if this is a login tty +# Automatically run X if this is a login tty [[ "$(tty)" == "/dev/tty1" ]] && ! pgrep -x Xorg >/dev/null && startx