summaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--zsh/.zimrc94
-rw-r--r--zsh/.zlogin59
-rw-r--r--zsh/.zprofile8
-rw-r--r--zsh/.zshenv4
-rw-r--r--zsh/.zshrc26
5 files changed, 191 insertions, 0 deletions
diff --git a/zsh/.zimrc b/zsh/.zimrc
new file mode 100644
index 0000000..96eab18
--- /dev/null
+++ b/zsh/.zimrc
@@ -0,0 +1,94 @@
+
+
+#################
+# CORE SETTINGS #
+#################
+
+#
+# Zim settings
+#
+
+# Select what modules you would like enabled.
+# The second line of modules may depend on options set by modules in the first line.
+# These dependencies are noted on the respective module's README.md.
+zmodules=(directory environment git history input ssh utility meta custom \
+ prompt syntax-highlighting history-substring-search completion)
+
+
+###################
+# MODULE SETTINGS #
+###################
+
+#
+# Prompt
+#
+
+# Set your desired prompt here
+zprompt_theme='pure'
+PURE_PROMPT_SYMBOL=λ
+
+#
+# Completion
+#
+
+# set an optional host-specific filename for the completion cache file
+# if none is provided, the default '.zcompdump' is used.
+#zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
+
+#
+# Utility
+#
+
+# Uncomment to enable command correction prompts
+# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
+setopt CORRECT
+
+#
+# Environment
+#
+
+# Set the string below to the desired terminal title format string.
+# The terminal title is redrawn upon directory change, however, variables like
+# ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
+# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
+# The example below uses the following format: 'username@host:/current/directory'
+ztermtitle='%n@%m:%~'
+
+#
+# Input
+#
+
+# Uncomment to enable double-dot expansion.
+# This appends '../' to your input for each '.' you type after an initial '..'
+#zdouble_dot_expand='true'
+
+#
+# Syntax-Highlighting
+#
+
+# This determines what highlighters will be used with the syntax-highlighting module.
+# Documentation of the highlighters can be found here:
+# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
+# For (u)rxvt, termite and gnome-terminal users,
+# removing the 'cursor' highlighter will fix the disappearing cursor problem
+#zhighlighters=(main brackets cursor)
+zhighlighters=(main brackets pattern)
+
+
+#
+# SSH
+#
+
+# Load these ssh identities with the ssh module
+zssh_ids=(id_rsa plasma_id_rsa id_ed25519 id_rsa_aur)
+
+
+#
+# Pacman
+#
+
+# Set (optional) pacman front-end.
+zpacman_frontend='pacaur'
+
+# Load any helper scripts as defined here
+#zpacman_helper=(aur)
diff --git a/zsh/.zlogin b/zsh/.zlogin
new file mode 100644
index 0000000..d8b5b0a
--- /dev/null
+++ b/zsh/.zlogin
@@ -0,0 +1,59 @@
+
+
+#
+# startup file read in interactive login shells
+#
+# The following code helps us by optimizing the existing framework.
+# This includes zcompile, zcompdump, etc.
+#
+
+(
+ # Function to determine the need of a zcompile. If the .zwc file
+ # does not exist, or the base file is newer, we need to compile.
+ # These jobs are asynchronous, and will not impact the interactive shell
+ zcompare() {
+ if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
+ zcompile ${1}
+ fi
+ }
+
+ zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
+ setopt EXTENDED_GLOB
+
+ # zcompile the completion cache; siginificant speedup.
+ for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
+ zcompare ${file}
+ done
+
+ # zcompile .zshrc
+ zcompare ${ZDOTDIR:-${HOME}}/.zshrc
+
+ # zcompile some light module init scripts
+ zcompare ${zim_mods}/git/init.zsh
+ zcompare ${zim_mods}/utility/init.zsh
+ zcompare ${zim_mods}/pacman/init.zsh
+ zcompare ${zim_mods}/spectrum/init.zsh
+ zcompare ${zim_mods}/completion/init.zsh
+ zcompare ${zim_mods}/fasd/init.zsh
+
+ # zcompile all .zsh files in the custom module
+ for file in ${zim_mods}/custom/**/^(README.md|*.zwc)(.); do
+ zcompare ${file}
+ done
+
+ # zcompile all autoloaded functions
+ for file in ${zim_mods}/**/functions/^(*.zwc)(.); do
+ zcompare ${file}
+ done
+
+ # syntax-highlighting
+ for file in ${zim_mods}/syntax-highlighting/external/highlighters/**/*.zsh; do
+ zcompare ${file}
+ done
+ zcompare ${zim_mods}/syntax-highlighting/external/zsh-syntax-highlighting.zsh
+
+ # zsh-histery-substring-search
+ zcompare ${zim_mods}/history-substring-search/external/zsh-history-substring-search.zsh
+
+
+) &! \ No newline at end of file
diff --git a/zsh/.zprofile b/zsh/.zprofile
new file mode 100644
index 0000000..656d599
--- /dev/null
+++ b/zsh/.zprofile
@@ -0,0 +1,8 @@
+export PATH=$HOME/.local/bin:$HOME/.cabal/bin:$HOME/.cargo/bin:$PATH
+export XDG_CONFIG_HOME=$HOME/.config
+export XDG_DATA_HOME=$HOME/.local/share
+export XDG_DATA_DIRS=/usr/local/share:/usr/share
+export MAILDIR="$HOME/mail"
+export CVS_RSH=ssh
+export MATHMODELS=$HOME/src/eiffel/mathmodels
+export RUST_SRC_PATH=~/.multirust/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src
diff --git a/zsh/.zshenv b/zsh/.zshenv
new file mode 100644
index 0000000..c23f284
--- /dev/null
+++ b/zsh/.zshenv
@@ -0,0 +1,4 @@
+# Ensure that a non-login, non-interactive shell has a defined environment.
+if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
+ source "${ZDOTDIR:-$HOME}/.zprofile"
+fi
diff --git a/zsh/.zshrc b/zsh/.zshrc
new file mode 100644
index 0000000..635bffb
--- /dev/null
+++ b/zsh/.zshrc
@@ -0,0 +1,26 @@
+# Bash-like navigation
+#export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
+export WORDCHARS='*?[]~=&;!#$%^(){}<>'
+
+fpath+=~/.zfunc
+
+# rehash if last command was pacaur or pacman
+# (so that zsh picks up changes in $PATH immediately)
+TRAPUSR1() { rehash}; precmd() { [[ $history[$[ HISTCMD -1 ]] == *(pacaur|pacman)* ]] && killall -USR1 zsh }
+
+
+
+#
+# User configuration sourced by interactive shells
+#
+
+# Source zim
+if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
+ source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
+fi
+
+
+ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
+#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
+
+source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh