aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zshrc149
1 files changed, 114 insertions, 35 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 9803b83..2a63903 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -1,8 +1,109 @@
-# ENV VARS
-export ZSH="$HOME/.oh-my-zsh"
-export XDG_CONFIG_HOME="$HOME/.config"
-export FZF_BASE="$HOME/.local/share/fzf"
+# Created by newuser for 5.8
+#
+### Added by Zinit's installer
+if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
+ print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
+ command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
+ command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
+ print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
+ print -P "%F{160}▓▒░ The clone has failed.%f%b"
+fi
+
+source "$HOME/.zinit/bin/zinit.zsh"
+autoload -Uz _zinit
+(( ${+_comps} )) && _comps[zinit]=_zinit
+
+# Load a few important annexes, without Turbo
+# (this is currently required for annexes)
+zinit light-mode for \
+ zinit-zsh/z-a-rust \
+ zinit-zsh/z-a-as-monitor \
+ zinit-zsh/z-a-patch-dl \
+ zinit-zsh/z-a-bin-gem-node
+
+### End of Zinit's installer chunk
+
+
+#####################
+# PROMPT #
+#####################
+zinit ice pick"async.zsh" src"pure.zsh"
+zinit light sindresorhus/pure
+
+#####################
+# PLUGINS #
+#####################
+zinit ice wait"0c" lucid atinit"zpcompinit;zpcdreplay"
+zinit light zdharma/fast-syntax-highlighting
+
+zinit ice wait"0a" lucid atload"_zsh_autosuggest_start"
+zinit light zsh-users/zsh-autosuggestions
+
+zinit ice wait"0a" lucid blockf atpull'zinit creinstall -q .'
+zinit light zsh-users/zsh-completions
+
+zinit ice lucid wait'0a' multisrc"shell/{completion,key-bindings}.zsh" id-as"junegunn/fzf_completions" pick"/dev/null"
+zinit light junegunn/fzf-bin
+
+#####################
+# HISTORY #
+#####################
+[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zhistory"
+HISTSIZE=290000
+SAVEHIST=$HISTSIZE
+
+#####################
+# SETOPT #
+#####################
+setopt extended_history # record timestamp of command in HISTFILE
+setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
+setopt hist_ignore_all_dups # ignore duplicated commands history list
+setopt hist_ignore_space # ignore commands that start with space
+setopt hist_verify # show command with history expansion to user before running it
+setopt inc_append_history # add commands to HISTFILE in order of execution
+setopt share_history # share command history data
+setopt always_to_end # cursor moved to the end in full completion
+setopt hash_list_all # hash everything before completion
+# setopt completealiases # complete alisases
+setopt always_to_end # when completing from the middle of a word, move the cursor to the end of the word
+setopt complete_in_word # allow completion from within a word/phrase
+setopt nocorrect # spelling correction for commands
+setopt list_ambiguous # complete as much of a completion until it gets ambiguous.
+setopt nolisttypes
+setopt listpacked
+setopt automenu
+unsetopt BEEP
+setopt vi
+
+#####################
+# BINDKEYS #
+#####################
+bindkey '^ ' autosuggest-accept
+
+#####################
+# FZF SETTINGS #
+#####################
+export FZF_DEFAULT_OPTS="
+--ansi
+--layout=default
+--info=inline
+--height=50%
+--multi
+--preview-window=right:50%
+--preview-window=sharp
+--preview-window=cycle
+--preview '([[ -f {} ]] && (bat --style=numbers --color=always --theme=gruvbox-dark --line-range :500 {} || cat {})) || ([[ -d {} ]] && (tree -C {} | less)) || echo {} 2> /dev/null | head -200'
+--prompt='λ -> '
+--pointer='|>'
+--marker='✓'
+--bind 'ctrl-e:execute(nvim {} < /dev/tty > /dev/tty 2>&1)' > selected"
+export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null'
+export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
+
+#####################
+# NNN #
+#####################
n ()
{
# Block nesting of nnn in subshells
@@ -23,52 +124,30 @@ n ()
fi
}
-ZSH_THEME="pygmalion"
-
-plugins=(git zsh-autosuggestions vi-mode fzf)
-
-source $ZSH/oh-my-zsh.sh
-
-# User configuration
-bindkey '^ ' autosuggest-accept
-
-# aliases
+#####################
+# ALIASES #
+#####################
+alias vim="nvim"
alias v="nvim"
alias n="n -de"
alias lsa='ls -A'
-alias mkd="mkdir -pv"
-alias youtube-mp3="youtube-dl -ic --restrict-filenames --extract-audio --audio-format mp3 --audio-quality 320k -o '~/Music/recent/%(autonumber)s-%(title)s.%(ext)s'"
-alias youtube-video="youtube-dl -ic --no-mtime --prefer-free-formats -o '~/Videos/recent/%(title)s.%(ext)s'"
-alias newnet="sudo sv restart NetworkManager"
-alias caltime="sudo timedatectl set-timezone America/Calgary"
-alias tortime="sudo timedatectl set-timezone America/Toronto"
-alias extract="~/.config/Scripts/extract.sh"
-alias ka="killall"
+alias yt="youtube-dl -ic"
+alias yta="youtube-dl -xic"
+#alias youtube-mp3="youtube-dl --extract-audio --audio-format mp3 --audio-quality 320k -o '~/Music/recent/%(title)s.%(ext)s'"
+alias youtube-video="youtube-dl -i --no-mtime --prefer-free-formats -c -o '~/Videos/recent/%(title)s.%(ext)s'"
alias fullclean="make clean && rm -f config.h && git reset --hard origin/master"
alias h="cd ~ && ls -a"
-alias d="cd ~/Documents && ls -a"
-alias D="cd ~/Downloads && ls -a"
-alias s="cd ~/.config/Scripts && ls -a"
-alias c="cd ~/.config/ && ll -a"
alias w="cd ~/wallpapers && ls -a"
alias cfb="nvim ~/.bashrc"
alias cfv="nvim ~/.config/nvim/init.vim"
-alias cfr="nvim ~/.config/vifm/vifmrc"
-alias cfR="nvim ~/.config/ranger/rc.conf"
-alias cfi="nvim ~/.config/i3/config"
-alias cfm="nvim ~/.config/mutt/muttrc"
-alias cff="nvim ~/.config/Scripts/folders"
-alias cfc="nvim ~/.config/Scripts/configs"
alias cfT="nvim ~/.config/Scripts/tmux.conf"
-alias cfa="nvim ~/.config/mutt/aliases"
-alias cfp="nvim ~/.config/polybar/mybar"
alias cfs="nvim ~/.config/sxhkd/sxhkdrc"
alias cfsb="nvim ~/.config/sxhkd/sxhkdrc_bspwm"
alias cfB="nvim ~/.config/bspwm/bspwmrc"
alias cfz="nvim ~/.zshrc"
+alias gst="git status"
#alias burn="ssh kdamani@10.0.5.4"
alias b="ssh kdamani@burne.sat"
alias dns="ssh administrator@ctrlf-dns"
-#[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh