check for tty

This commit is contained in:
Daylin Morgan 2022-05-18 00:21:46 -05:00
parent 4dae99b7ef
commit 3f7ea82def
4 changed files with 15 additions and 3 deletions

8
bin/is-tty Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
case $(tty) in /dev/tty[0-9]*)
exit 0;;
*)
exit 1;;
esac

View file

@ -35,4 +35,4 @@ unset EXTRAFILE
export DOTFILES_DIR DOTFILES_EXTRA_DIR export DOTFILES_DIR DOTFILES_EXTRA_DIR
[ -f ~/.welcome ] && clear && cat ~/.welcome [ -f ~/.welcome ] && [ ! is-tty ] && clear && cat ~/.welcome

View file

@ -67,7 +67,11 @@ fi
export ENHANCD_DOT_ARG="up" 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 export EGET_BIN=$HOME/bin