diff --git a/bin/is-executable b/bin/is-executable index 1943a11..31e2fa1 100755 --- a/bin/is-executable +++ b/bin/is-executable @@ -4,4 +4,4 @@ if [ -x "$(command -v $1)" ]; then exit 0 else exit 1 -fi \ No newline at end of file +fi diff --git a/bin/is-tty b/bin/is-tty new file mode 100755 index 0000000..6c1d2ba --- /dev/null +++ b/bin/is-tty @@ -0,0 +1,8 @@ +#!/bin/sh + +case $(tty) in /dev/tty[0-9]*) + exit 0;; + *) + exit 1;; +esac + diff --git a/home/dot_zshrc b/home/dot_zshrc index d2bedd6..d03527e 100644 --- a/home/dot_zshrc +++ b/home/dot_zshrc @@ -35,4 +35,4 @@ unset EXTRAFILE export DOTFILES_DIR DOTFILES_EXTRA_DIR -[ -f ~/.welcome ] && clear && cat ~/.welcome +[ -f ~/.welcome ] && [ ! is-tty ] && clear && cat ~/.welcome diff --git a/system/env.sh b/system/env.sh index 9ed2616..4761b11 100644 --- a/system/env.sh +++ b/system/env.sh @@ -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