aboutsummaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-24 10:23:59 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-24 10:23:59 +0200
commit5260c02746f0825ee90eb56c4fe91a6bf39cc9cc (patch)
tree8d1cb0c4cbce0b9133664a59a845f5bf505ccbbd /.zshrc
parent3a70f9f76654ff63e3242cf3324cc77c44e1980f (diff)
downloaddotfiles-5260c02746f0825ee90eb56c4fe91a6bf39cc9cc.tar.gz
dotfiles-5260c02746f0825ee90eb56c4fe91a6bf39cc9cc.tar.bz2
dotfiles-5260c02746f0825ee90eb56c4fe91a6bf39cc9cc.zip
Changing zsh prompt if tty or display
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc26
1 files changed, 20 insertions, 6 deletions
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