From 5260c02746f0825ee90eb56c4fe91a6bf39cc9cc Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 24 May 2020 10:23:59 +0200 Subject: Changing zsh prompt if tty or display --- .zshrc | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index b3e9722..74a4f5e 100644 --- a/.zshrc +++ b/.zshrc @@ -7,12 +7,24 @@ export DOTFILES=$HOME/dotfiles # load aliases source $DOTFILES/.zsh_aliases -# pure prompt -export FPATH="$FPATH:$HOME/.zsh/pure" -ZSH_THEME="pure" -autoload -U promptinit -promptinit -prompt pure +# prompt +case `tty` in + /dev/tty[1-9]) + # %~ path ('~' if $HOME) + # %B/%b start/stop bold + # %B/%b start/stop color + NEWLINE=$'\n' + export PROMPT="${NEWLINE}%B%F{blue}%~%f${NEWLINE}%F{red}> %f%b" + ;; + *) + # pure prompt + export FPATH="$FPATH:$HOME/.zsh/pure" + ZSH_THEME="pure" + autoload -U promptinit + promptinit + prompt pure + ;; +esac # auto complete autoload -U compinit @@ -86,3 +98,5 @@ source $HOME/.zsh/zsh-you-should-use/you-should-use.plugin.zsh # alias r # set tab to 4 spaces tabs 4 + +export LFS=/mnt -- cgit