check for tty
This commit is contained in:
parent
4dae99b7ef
commit
3f7ea82def
4 changed files with 15 additions and 3 deletions
|
@ -4,4 +4,4 @@ if [ -x "$(command -v $1)" ]; then
|
|||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
8
bin/is-tty
Executable file
8
bin/is-tty
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $(tty) in /dev/tty[0-9]*)
|
||||
exit 0;;
|
||||
*)
|
||||
exit 1;;
|
||||
esac
|
||||
|
|
@ -35,4 +35,4 @@ unset EXTRAFILE
|
|||
|
||||
export DOTFILES_DIR DOTFILES_EXTRA_DIR
|
||||
|
||||
[ -f ~/.welcome ] && clear && cat ~/.welcome
|
||||
[ -f ~/.welcome ] && [ ! is-tty ] && clear && cat ~/.welcome
|
||||
|
|
|
@ -67,7 +67,11 @@ fi
|
|||
|
||||
export ENHANCD_DOT_ARG="up"
|
||||
|
||||
export STARSHIP_CONFIG=~/.config/starship/config.toml
|
||||
if is-tty; then
|
||||
export STARSHIP_CONFIG=~/.config/starship/plain.toml
|
||||
else
|
||||
export STARSHIP_CONFIG=~/.config/starship/config.toml
|
||||
fi
|
||||
|
||||
export EGET_BIN=$HOME/bin
|
||||
|
||||
|
|
Loading…
Reference in a new issue