summaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--zsh/.zimrc4
-rw-r--r--zsh/.zlogin57
-rw-r--r--zsh/.zprofile4
-rw-r--r--zsh/.zshrc42
4 files changed, 40 insertions, 67 deletions
diff --git a/zsh/.zimrc b/zsh/.zimrc
index 2b07dee..1ef71b2 100644
--- a/zsh/.zimrc
+++ b/zsh/.zimrc
@@ -11,7 +11,7 @@
# 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 git-info history input ssh utility meta custom \
+zmodules=(directory environment git git-info history input ssh utility custom \
syntax-highlighting history-substring-search prompt completion)
@@ -25,8 +25,6 @@ zmodules=(directory environment git git-info history input ssh utility meta cust
# Set your desired prompt here
zprompt_theme='pure'
-#zprompt_theme='gitster'
-#zprompt_theme='minimal'
PURE_PROMPT_SYMBOL=λ
#PURE_PROMPT_SYMBOL=➜
diff --git a/zsh/.zlogin b/zsh/.zlogin
index d8b5b0a..e29c860 100644
--- a/zsh/.zlogin
+++ b/zsh/.zlogin
@@ -1,59 +1,8 @@
#
-# startup file read in interactive login shells
+# User configuration sourced by 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
+# Initialize zim
+[[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh \ No newline at end of file
diff --git a/zsh/.zprofile b/zsh/.zprofile
index d1948bf..a5786c3 100644
--- a/zsh/.zprofile
+++ b/zsh/.zprofile
@@ -1,5 +1,5 @@
#PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
-PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
+#PATH=$HOME/.gem/ruby/2.4.0/bin:$PATH
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
@@ -19,5 +19,7 @@ export PATH="$HOME/usr/build/pvs:$PATH"
export SBCLISP_HOME=/usr/share/sbcl-source
export PVS_LIBRARY_PATH="$HOME/usr/build/pvs/nasalib"
+export MOZ_USE_XINPUT2=1
+
#if [ -e /home/amin/.nix-profile/etc/profile.d/nix.sh ]; then . /home/amin/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 4de08ab..75126ac 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -1,8 +1,7 @@
# Bash-like navigation
#export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
-export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
-
-fpath+=~/.zfunc
+#export WORDCHARS='*?-[]~=&;!#$%^(){}<>'
+export WORDCHARS='*?[]~=&;!#$%^(){}<>'
disable -r time # disable shell reserved word
alias time='time -p' # -p for POSIX output
@@ -11,24 +10,45 @@ alias time='time -p' # -p for POSIX output
# (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
+# Change default zim location
+export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
+# Start zim
+[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh
ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
#ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
+setopt globdots
+
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.zsh/zsh-autopair/autopair.zsh
+
+### fzf ###
+
+source /usr/share/fzf/key-bindings.zsh
+source /usr/share/fzf/completion.zsh
+
+# Accept history selection instead of putting it on
+# the command line
+fzf-history-widget-accept() {
+ fzf-history-widget
+ zle accept-line
+}
+#zle -N fzf-history-widget-accept
+#bindkey '^R' fzf-history-widget-accept
+
+# alt+c preview
+export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'"
+
+### fzf ###
+
+
# aliases
alias mpv="mpv --ytdl-format mp4"
alias mv="mv -iv"
@@ -37,3 +57,7 @@ alias scl=systemctl
alias jcl=journalctl
alias m="mbsync -Va; getmail; notmuch new"
alias best="youtube-dl -f best"
+
+# i-beam cursor
+echo -e "\033[5 q"
+#echo -e "\033[6 q"