aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules6
-rw-r--r--00-prompt.zsh1
-rw-r--r--01-aliases.zsh5
-rw-r--r--03-environment.zsh8
-rw-r--r--04-options.zsh7
-rw-r--r--98-bindkeys.zsh6
-rw-r--r--99-plugins.zsh6
-rw-r--r--plugins/completions/.gitkeep0
m---------plugins/zsh-autosuggestions0
m---------plugins/zsh-syntax-highlighting0
-rw-r--r--prompts/rahm1.zsh51
-rw-r--r--zshrc5
12 files changed, 95 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..a383eb0
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
+[submodule "plugins/zsh-autosuggestions"]
+ path = plugins/zsh-autosuggestions
+ url = https://github.com/zsh-users/zsh-autosuggestions
+[submodule "plugins/zsh-syntax-highlighting"]
+ path = plugins/zsh-syntax-highlighting
+ url = https://github.com/zsh-users/zsh-syntax-highlighting
diff --git a/00-prompt.zsh b/00-prompt.zsh
new file mode 100644
index 0000000..a6354b3
--- /dev/null
+++ b/00-prompt.zsh
@@ -0,0 +1 @@
+source "$HOME/.zshrc.d/prompts/$(hostname).zsh"
diff --git a/01-aliases.zsh b/01-aliases.zsh
new file mode 100644
index 0000000..d4c73b4
--- /dev/null
+++ b/01-aliases.zsh
@@ -0,0 +1,5 @@
+alias ls='ls --color=auto'
+alias no=ls
+
+alias copy="xclip -selection c -i"
+alias put="xclip -selection c -o"
diff --git a/03-environment.zsh b/03-environment.zsh
new file mode 100644
index 0000000..8524dbd
--- /dev/null
+++ b/03-environment.zsh
@@ -0,0 +1,8 @@
+export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
+
+if [[ "$TERM" == "alacritty" ]] ; then
+ export TERM=xterm-256color
+fi
+
+export LANG=en_US.UTF-8
+export EDITOR=nvim
diff --git a/04-options.zsh b/04-options.zsh
new file mode 100644
index 0000000..35b0a85
--- /dev/null
+++ b/04-options.zsh
@@ -0,0 +1,7 @@
+zstyle ':completion:*' menu select
+zmodload zsh/complist
+
+zstyle ':completion:*' matcher-list '' \
+ 'm:{a-z\-}={A-Z\_}' \
+ 'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \
+ 'r:|?=** m:{a-z\-}={A-Z\_}'
diff --git a/98-bindkeys.zsh b/98-bindkeys.zsh
new file mode 100644
index 0000000..50058e9
--- /dev/null
+++ b/98-bindkeys.zsh
@@ -0,0 +1,6 @@
+bindkey -v
+
+bindkey -M menuselect 'h' vi-backward-char
+bindkey -M menuselect 'k' vi-up-line-or-history
+bindkey -M menuselect 'l' vi-forward-char
+bindkey -M menuselect 'j' vi-down-line-or-history
diff --git a/99-plugins.zsh b/99-plugins.zsh
new file mode 100644
index 0000000..ab28c43
--- /dev/null
+++ b/99-plugins.zsh
@@ -0,0 +1,6 @@
+source ~/.zshrc.d/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
+source ~/.zshrc.d/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+
+fpath=(~/.zshrc.d/plugins/completions/ $fpath)
+
+[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
diff --git a/plugins/completions/.gitkeep b/plugins/completions/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/plugins/completions/.gitkeep
diff --git a/plugins/zsh-autosuggestions b/plugins/zsh-autosuggestions
new file mode 160000
+Subproject a411ef3e0992d4839f0732ebeb9823024afaaaa
diff --git a/plugins/zsh-syntax-highlighting b/plugins/zsh-syntax-highlighting
new file mode 160000
+Subproject 1a9264bc661b3d52756916bf9ec3f41687d64db
diff --git a/prompts/rahm1.zsh b/prompts/rahm1.zsh
new file mode 100644
index 0000000..bb0b86f
--- /dev/null
+++ b/prompts/rahm1.zsh
@@ -0,0 +1,51 @@
+grey='\e[0;90m'
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}["
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="]%{$fg[red]%}▲%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="] "
+
+GREEN="%{\x1b[01;32m%}"
+PURPLE="%{\x1b[01;35m%}"
+ORANGE="%{\x1b[01;38;5;208m%}"
+GRAY="%{\x1b[01;38;5;239m%}"
+RED="%{\x1b[01;31m%}"
+RESET="%{\x1b[00m%}"
+
+terminal_color_1="${ORANGE}"
+terminal_color_2="${GRAY}"
+terminal_color_3="${ORANGE}"
+terminal_color_4="${GRAY}"
+terminal_color_5="${GRAY}"
+terminal_color_6="${GRAY}"
+terminal_color_7="${GRAY}"
+
+function rahm_prompt {
+ ec=$?
+ preamble=""
+
+ default="${terminal_color_4}"
+ if [ "$ec" -eq "0" ] ; then
+ code="${GREEN}--${default}"
+ else
+ code="${RED}$(printf '%02x' $ec)${default}"
+ fi
+
+ underline=''
+ name="${terminal_color_1}%n@${default}"
+ host="${terminal_color_3}%m${default}"
+ directory="${terminal_color_2}%2~${default}"
+
+ echo "${default}𝜆₀ ${code} ${underline}${name}${host} ${directory} → %{\x1b[00m%}"
+}
+
+function rahm_rprompt {
+ default="${terminal_color_4}"
+ time="${terminal_color_3}%*${default}"
+ echo "${default}← ${time} ${RESET}"
+}
+
+setopt prompt_subst
+
+PROMPT='$(rahm_prompt)'
+RPROMPT='$(rahm_rprompt)'
diff --git a/zshrc b/zshrc
new file mode 100644
index 0000000..f7a0522
--- /dev/null
+++ b/zshrc
@@ -0,0 +1,5 @@
+source /etc/profile
+
+for f in $HOME/.zshrc.d/*.zsh ; do
+ source "$f"
+done