Run X before attempting to launch tmux
This commit is contained in:
parent
86df65fc29
commit
eb4ec29abc
|
@ -11,7 +11,7 @@ export TERM="xterm-256color"
|
||||||
export EDITOR="vi"
|
export EDITOR="vi"
|
||||||
export VISUAL="vi"
|
export VISUAL="vi"
|
||||||
|
|
||||||
export PATH="$PATH:$HOME/.local/bin/:$HOME/go/bin/"
|
export PATH="$PATH:$HOME/.local/bin/:$HOME/go/bin/:$HOME/bin/maltego_4.6.0/bin/"
|
||||||
|
|
||||||
export CDPATH=".:$HOME"
|
export CDPATH=".:$HOME"
|
||||||
|
|
||||||
|
@ -72,10 +72,10 @@ md() {
|
||||||
mkdir -p "$1" && cd "$1" || return
|
mkdir -p "$1" && cd "$1" || return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Automatically run X if this is a login tty
|
||||||
|
[[ "$(tty)" == "/dev/tty1" ]] && ! pgrep -x Xorg >/dev/null && startx
|
||||||
|
|
||||||
# Automatically run tmux if we aren't already in a session and there's no matching session already running
|
# 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 2>/dev/null | grep --quiet "$HOSTNAME"; then
|
if [[ -z "$TMUX" ]] && ! tmux list-sessions 2>/dev/null | grep --quiet "$HOSTNAME"; then
|
||||||
tmux new -s "$HOSTNAME"
|
tmux new -s "$HOSTNAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Automatically run X if this is a login tty
|
|
||||||
[[ "$(tty)" == "/dev/tty1" ]] && ! pgrep -x Xorg >/dev/null && startx
|
|
||||||
|
|
Loading…
Reference in New Issue