mirror of
https://github.com/danbee/dotfiles-local
synced 2025-03-04 08:49:07 +00:00
Compare commits
2 Commits
8cadda8bd1
...
59a859d71a
| Author | SHA1 | Date | |
|---|---|---|---|
| 59a859d71a | |||
| 3181b3828c |
@ -1,7 +1,7 @@
|
|||||||
if has("gui_running") || has("gui_vimr")
|
if has("gui_running") || has("gui_vimr")
|
||||||
" Set GUI font according to OS
|
" Set GUI font according to OS
|
||||||
if has("gui_macvim")
|
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")
|
elseif has("gui_gtk2")
|
||||||
set guifont=DejaVu\ Sans\ Mono\ 15
|
set guifont=DejaVu\ Sans\ Mono\ 15
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -23,6 +23,23 @@ update_git_prompt() {
|
|||||||
GIT_PROMPT+="%{$fg[blue]%}]%{$reset_color%} "
|
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
|
autoload -Uz add-zsh-hook
|
||||||
|
|
||||||
add-zsh-hook precmd update_git_prompt
|
add-zsh-hook precmd update_git_prompt
|
||||||
@ -38,7 +55,7 @@ export CLICOLOR=1
|
|||||||
setopt promptsubst
|
setopt promptsubst
|
||||||
|
|
||||||
# prompt
|
# 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}'
|
export RPROMPT='%D{%K:%M:%S}'
|
||||||
|
|
||||||
# update the prompt on carriage return
|
# update the prompt on carriage return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user