# Start configuration added by Zim install # # User configuration sourced by interactive shells # # ----------------- # Zsh configuration # ----------------- # # History # # Remove older command from the history if a duplicate is to be added. setopt HIST_IGNORE_ALL_DUPS # # Input/output # # Set editor default keymap to emacs (`-e`) or vi (`-v`) bindkey -e # Prompt for spelling correction of commands. setopt CORRECT # Customize spelling correction prompt. #SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' # Remove path separator from WORDCHARS. WORDCHARS=${WORDCHARS//[\/]} # ----------------- # Zim configuration # ----------------- # Use degit instead of git as the default tool to install and update modules. #zstyle ':zim:zmodule' use 'degit' # -------------------- # Module configuration # -------------------- # # completion # # Set a custom path for the completion dump file. # If none is provided, the default ${ZDOTDIR:-${HOME}}/.zcompdump is used. #zstyle ':zim:completion' dumpfile "${ZDOTDIR:-${HOME}}/.zcompdump-${ZSH_VERSION}" # # git # # Set a custom prefix for the generated aliases. The default prefix is 'G'. #zstyle ':zim:git' aliases-prefix 'g' # # input # # Append `../` to your input for each `.` you type after an initial `..` zstyle ':zim:input' double-dot-expand yes # # termtitle # # Set a custom terminal title format using prompt expansion escape sequences. # See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes # If none is provided, the default '%n@%m: %~' is used. zstyle ':zim:termtitle' format '%1~' # # zsh-autosuggestions # # Customize the style that the suggestions are shown with. # See https://github.com/zsh-users/zsh-autosuggestions/blob/master/README.md#suggestion-highlight-style #ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=242' # # zsh-syntax-highlighting # # Set what highlighters will be used. # See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) # Customize the main highlighter styles. # See https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md#how-to-tweak-it #typeset -A ZSH_HIGHLIGHT_STYLES #ZSH_HIGHLIGHT_STYLES[comment]='fg=242' # ------------------ # Initialize modules # ------------------ if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then # Download zimfw script if missing. command mkdir -p ${ZIM_HOME} if (( ${+commands[curl]} )); then command curl -fsSL -o ${ZIM_HOME}/zimfw.zsh https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh else command wget -nv -O ${ZIM_HOME}/zimfw.zsh https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh fi fi if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then # Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated. source ${ZIM_HOME}/zimfw.zsh init -q fi source ${ZIM_HOME}/init.zsh # ------------------------------ # Post-init module configuration # ------------------------------ # # zsh-history-substring-search # # Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down # Bind up and down keys zmodload -F zsh/terminfo +p:terminfo if [[ -n ${terminfo[kcuu1]} && -n ${terminfo[kcud1]} ]]; then bindkey ${terminfo[kcuu1]} history-substring-search-up bindkey ${terminfo[kcud1]} history-substring-search-down fi bindkey '^P' history-substring-search-up bindkey '^N' history-substring-search-down bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down # End configuration added by Zim install # Executable paths export PATH="$PATH:$HOME/dotfiles/bin" export PATH="$PATH:$HOME/.emacs.d/bin" export PATH="$PATH:$HOME/.cargo/bin" export PATH="$PATH:$HOME/.local/bin" export ANDROID_HOME="$HOME/SDKs/Android" export PATH="$PATH:$ANDROID_HOME/cmdline-tools/tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator" export PATH="$PATH:$HOME/.gem/ruby/2.7.0/bin" export PATH="$PATH:$HOME/.gem/ruby/3.0.0/bin" export PATH="$PATH:$HOME/go/bin" CASE_SENSITIVE="false" export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring #HYPHEN_INSENSITIVE="true" # Uncomment the following line if pasting URLs and other text is messed up. # DISABLE_MAGIC_FUNCTIONS=true # Uncomment the following line if you want to disable marking untracked files # under VCS as dirty. This makes repository status check for large repositories # much, much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" #plugins=( # git # golang # zsh-autosuggestions # zsh-completions # lxd-completion-zsh # fzf-zsh #) # Other completions compctl -g '~/.teamocil/*(:t:r)' teamocil #source $ZSH/oh-my-zsh.sh source /usr/share/z/z.sh # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. #[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh #source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # Ranger conf export RANGER_LOAD_DEFAULT_RC=false export LANG=en_GB.UTF-8 export EDITOR='devour emacsclient -c' export VISUAL='devour emacsclient -c' export _JAVA_AWT_WM_NONREPARENTING=1 export MANPAGER="nvim +Man!" export COLUMNS=80 export MANWIDTH=80 alias e="$EDITOR" alias u="linx-client" alias vim="nvim" alias tmp="cd $(mktemp -d)" alias send="rsync -avmzzP" alias tree="exa --tree" alias bat="bat -n --theme base16 --tabs 2" alias mov="ranger ~/Videos/Movies" alias tv="ranger ~/Videos/TV\ Shows" alias yt="ranger ~/Videos/YouTube" alias pass='str="$(pwgen -s 25 1)" && echo "$str" && echo -n "$str" | xclip -selection clipboard' alias secluded="cd ~/repos/sites/secluded/ && hugo --cleanDestinationDir && rsync -avmzz public/ hel1-srv1:/var/www/secluded/" alias erase="shred -vzfun 32" alias dl="youtube-dl -f bestvideo+bestaudio --write-sub --write-auto-sub --sub-lang en --sub-format srt/best --convert-subs srt --embed-subs -o '%(upload_date)s %(title)s.%(ext)s'" alias us="unsilence -t 15 -as 1.25" alias dotgit="python3 ~/dotfiles/dotgit/dotgit/__main__.py" alias roll="roll -v" alias dn="notify-send done" alias sxiv="sxiv -p" alias tt="tasktimer" # devour windows function zathura() { devour zathura "$1" } function inkscape() { devour inkscape "$1" } # Functions function gi() { curl -sLw n https://www.toptal.com/developers/gitignore/api/$@ ; } function noti() { curl 'https://notify.nixnet.services/message?token={{- .gotify_token -}}' -F "title=$1" -F "message=$2" -F "priority=4" } PATH="{{ .chezmoi.homeDir }}/perl5/bin${PATH:+:${PATH}}"; export PATH; PERL5LIB="{{ .chezmoi.homeDir }}/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; PERL_LOCAL_LIB_ROOT="{{ .chezmoi.homeDir }}/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; PERL_MB_OPT="--install_base \"{{ .chezmoi.homeDir }}/perl5\""; export PERL_MB_OPT; PERL_MM_OPT="INSTALL_BASE={{ .chezmoi.homeDir }}/perl5"; export PERL_MM_OPT; autoload -U +X bashcompinit && bashcompinit complete -o nospace -C /usr/local/bin/bitcomplete bit # Necessary for SSH & YubiKey export GPG_TTY="$TTY" export SSH_AUTH_SOCK="/run/user/1000/gnupg/S.gpg-agent.ssh" gpgconf --launch gpg-agent