1
0
mirror of https://github.com/danbee/dotfiles-local synced 2025-03-04 08:49:07 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
59a859d71a
The font name changed somewhere... 2019-08-28 20:54:40 -04:00
3181b3828c
Add distro to prompt 2019-08-28 20:54:29 -04:00
2 changed files with 19 additions and 2 deletions

View File

@ -1,7 +1,7 @@
if has("gui_running") || has("gui_vimr")
" Set GUI font according to OS
if has("gui_macvim")
set guifont=Sauce\ Code\ Pro\ Nerd\ Font\ Complete\ Mono:h13
set guifont=SauceCodePro\ Nerd\ Font\ Mono:h13
elseif has("gui_gtk2")
set guifont=DejaVu\ Sans\ Mono\ 15
endif

View File

@ -23,6 +23,23 @@ update_git_prompt() {
GIT_PROMPT+="%{$fg[blue]%}]%{$reset_color%} "
}
os_icon() {
case `uname` in
Darwin)
echo "%{$fg[white]%} macOS%{$reset_color%}"
;;
Linux)
echo "%{$fg[yellow]%} Linux%{$reset_color%}"
;;
FreeBSD)
echo "%{$fg[red]%} FreeBSD%{$reset_color%}"
;;
OpenBSD)
echo "%{$fg[yellow]%}OpenBSD%{$reset_color%}"
;;
esac
}
autoload -Uz add-zsh-hook
add-zsh-hook precmd update_git_prompt
@ -38,7 +55,7 @@ export CLICOLOR=1
setopt promptsubst
# prompt
export PROMPT='${SSH_CONNECTION+"%{$fg[yellow]%}%n@%m%{$reset_color%}:"}%{$fg_bold[green]%}%2c%{$reset_color%} ${GIT_PROMPT}%{$fg_bold[cyan]%}%{$reset_color%} '
export PROMPT='$(os_icon) ${SSH_CONNECTION+"%{$fg[yellow]%}%n@%m%{$reset_color%}:"}%{$fg_bold[green]%}%2c%{$reset_color%} ${GIT_PROMPT}%{$fg_bold[cyan]%}%{$reset_color%} '
export RPROMPT='%D{%K:%M:%S}'
# update the prompt on carriage return