Use glob comparison properly
This commit is contained in:
parent
558b2611cf
commit
25f5340162
|
@ -73,7 +73,7 @@ md() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Automatically run X if this is a login tty
|
# Automatically run X if this is a login tty
|
||||||
[[ "$(tty)" == /dev/tty* ]] && ! pgrep -u "$(whoami)" -x Xorg >/dev/null && startx
|
[[ "$(tty)" =~ /dev/tty* ]] && ! pgrep -u "$(whoami)" -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
|
||||||
|
|
Loading…
Reference in New Issue