aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--00-prompt.zsh3
-rw-r--r--04-options.zsh21
-rw-r--r--99-plugins.zsh4
-rw-r--r--local/.gitkeep0
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