summaryrefslogtreecommitdiff
path: root/cfg/zsh/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'cfg/zsh/zshrc')
-rwxr-xr-xcfg/zsh/zshrc94
1 files changed, 94 insertions, 0 deletions
diff --git a/cfg/zsh/zshrc b/cfg/zsh/zshrc
new file mode 100755
index 0000000..73f7c94
--- /dev/null
+++ b/cfg/zsh/zshrc
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+# History File
+HISTFILE=$ZDOTDIR/zsh_history
+HISTSIZE=1001
+SAVEHIST=1000
+setopt HIST_EXPIRE_DUPS_FIRST
+setopt HIST_IGNORE_DUPS
+setopt HIST_IGNORE_ALL_DUPS
+setopt HIST_IGNORE_SPACE
+setopt HIST_FIND_NO_DUPS
+setopt HIST_SAVE_NO_DUPS
+
+# autocompletion
+
+# Prompts
+PROMPT="[%n] %F{blue}%d%f > "
+RPROMPT="%? | %*"
+
+# Generate cd aliases
+while read a c ; do
+ alias "cd$a"="cd $c"
+done <<< "$(cat "$HOME"/cdabbr)"
+
+# Various
+export LANG=en_GB.UTF-8
+unsetopt autocd
+unsetopt beep
+bindkey -v
+
+# Aliases
+alias ls="eza"
+alias l="ls -l"
+alias ll="ls -la"
+alias hx="helix"
+alias vim="nvim"
+alias v="nvim"
+alias zshrc="nvim $HOME/.config/zsh/.zshrc"
+alias zshenv="nvim $HOME/.config/zsh/.zshenv"
+alias profile="nvim $HOME/.profile"
+alias zprofile="nvim $HOME/.config/zsh/.zprofile"
+
+alias tasks="nvim $HOME/tasks"
+alias impl="nvim $HOME/impl"
+alias fonts="nvim $HOME/.config/fontconfig/fonts.conf"
+alias feeds="nvim $HOME/.config/newsboat/urls"
+alias nb="newsboat"
+alias packages="pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'"
+
+# countdown() {\
+# start="$(( $(date '+%s') + $1))"\
+# while [ $start -ge $(date +%s) ]; do\
+# time="$(( $start - $(date +%s) ))"\
+# printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"\
+# sleep 0.1\
+# done\
+# }\
+# \
+# stopwatch() {\
+# start=$(date +%s)\
+# while true; do\
+# time="$(( $(date +%s) - $start))"\
+# printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"\
+# sleep 0.1\
+# done\
+# }
+
+###
+
+# The following lines were added by compinstall
+
+zstyle ':completion:*' auto-description 'specify: %d'
+zstyle ':completion:*' completer _complete _ignored _approximate
+zstyle ':completion:*' completions 1
+zstyle ':completion:*' format '-- %d --'
+zstyle ':completion:*' glob 1
+zstyle ':completion:*' group-name ''
+zstyle ':completion:*' ignore-parents parent pwd
+zstyle ':completion:*' insert-unambiguous true
+zstyle ':completion:*' list-colors ''
+zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
+zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]} r:|[._-/]=** r:|=**' 'm:{[:lower:]}={[:upper:]} r:|[._-/]=** r:|=**' 'm:{[:lower:]}={[:upper:]} r:|[._-/]=** r:|=**' 'm:{[:lower:]}={[:upper:]} r:|[._-/]=** r:|=**'
+zstyle ':completion:*' max-errors 5
+zstyle ':completion:*' menu select=1
+zstyle ':completion:*' original true
+zstyle ':completion:*' prompt '!- corrections (%e) -!'
+zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
+zstyle ':completion:*' substitute 1
+zstyle ':completion:*' verbose true
+zstyle :compinstall filename '/home/neo/.config/zsh/.zshrc'
+
+autoload -Uz compinit
+compinit
+# End of lines added by compinstall