diff options
author | Josh Rahm <rahm@google.com> | 2021-11-11 12:27:44 -0700 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2021-11-11 12:31:46 -0700 |
commit | 62d7881f27857401e868b2d19d4af9cb00ea4661 (patch) | |
tree | 0ecf21de9dd93f9dd28a4ea6ceb9ea27e92f34e9 | |
parent | b78c3b1f01685a58907f63445efa012a5cbc3566 (diff) | |
download | zshrcd-62d7881f27857401e868b2d19d4af9cb00ea4661.tar.gz zshrcd-62d7881f27857401e868b2d19d4af9cb00ea4661.tar.bz2 zshrcd-62d7881f27857401e868b2d19d4af9cb00ea4661.zip |
Add local folder. Add prompt change.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | 00-prompt.zsh | 3 | ||||
-rw-r--r-- | 04-options.zsh | 21 | ||||
-rw-r--r-- | 99-plugins.zsh | 4 | ||||
-rw-r--r-- | local/.gitkeep | 0 |
5 files changed, 29 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a0b2eb2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Ignore files specific to whatever machine. +local/* diff --git a/00-prompt.zsh b/00-prompt.zsh index a6354b3..439a25d 100644 --- a/00-prompt.zsh +++ b/00-prompt.zsh @@ -1 +1,2 @@ -source "$HOME/.zshrc.d/prompts/$(hostname).zsh" +source "$HOME/.zshrc.d/prompts/$(hostname).zsh" 2>/dev/null || \ + source "$HOME/.zshrc.d/local/prompts/$(hostname).zsh" 2>/dev/null diff --git a/04-options.zsh b/04-options.zsh index 35b0a85..e22f3c8 100644 --- a/04-options.zsh +++ b/04-options.zsh @@ -5,3 +5,24 @@ zstyle ':completion:*' matcher-list '' \ 'm:{a-z\-}={A-Z\_}' \ 'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \ 'r:|?=** m:{a-z\-}={A-Z\_}' + +# Change cursor shape for different vi modes. +function zle-keymap-select { + if [[ ${KEYMAP} == vicmd ]] || + [[ $1 = 'block' ]]; then + echo -ne '\e[1 q' + + elif [[ ${KEYMAP} == main ]] || + [[ ${KEYMAP} == viins ]] || + [[ ${KEYMAP} = '' ]] || + [[ $1 = 'beam' ]]; then + echo -ne '\e[5 q' + fi +} +zle -N zle-keymap-select + +# Use beam shape cursor on startup. +echo -ne '\e[5 q' +_fix_cursor() { + echo -ne '\e[5 q' +} diff --git a/99-plugins.zsh b/99-plugins.zsh index ab28c43..bba5cb7 100644 --- a/99-plugins.zsh +++ b/99-plugins.zsh @@ -4,3 +4,7 @@ source ~/.zshrc.d/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh fpath=(~/.zshrc.d/plugins/completions/ $fpath) [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +for f in ~/.zshrc.d/local/*.zsh ; do + source "$f" +done 2>/dev/null diff --git a/local/.gitkeep b/local/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/local/.gitkeep |