From bfc70707130ba022238176945b001cfd3ee2cff3 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 4 Oct 2022 00:55:02 +0100 Subject: [PATCH] feat: add .zshrc --- dot_zshrc | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 dot_zshrc diff --git a/dot_zshrc b/dot_zshrc new file mode 100644 index 0000000..6be6413 --- /dev/null +++ b/dot_zshrc @@ -0,0 +1,102 @@ +### plugins via antigen {{{ +# don't pollute $HOME with antigen +ADOTDIR="$HOME/.local/share/antigen" +if [[ ! -d "$ADOTDIR" ]]; then + mkdir -p "$ADOTDIR" + curl -L https://git.io/antigen > "$ADOTDIR/antigen.zsh" + chmod +x "$ADOTDIR" +fi + +# load antigen +source "$ADOTDIR/antigen.zsh" +antigen use oh-my-zsh +antigen bundle colored-man-pages +antigen bundle colorize +antigen bundle command-not-found +antigen bundle git +antigen bundle jeffreytse/zsh-vi-mode +antigen bundle zsh-users/zsh-autosuggestions +antigen bundle zsh-users/zsh-completions +antigen bundle zsh-users/zsh-syntax-highlighting + +antigen apply + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +export HISTFILE="$HOME/.zhistory" +export HISTSIZE=10000 +export SAVEHIST=10000 +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_IGNORE_DUPS + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# Forcing 256 bit colour +TERM=xterm-256color + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# Coloured GCC warnings and errors +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +eval "$(oh-my-posh --init --shell zsh --config ~/.config/M365Princess.omp.json)" + +. "$HOME/.cargo/env" +. "$HOME/.config/wezterm/wezterm.sh" + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + +export PATH="$PATH:$HOME/.local/bin" +export PATH="$PATH:/usr/bin/go/bin" +export M2_HOME="$HOME/.local/bin/apache-maven-3.8.6/bin" +export PATH="$PATH:$M2_HOME" +export DENO_INSTALL="$HOME/.deno" +export PATH="$DENO_INSTALL/bin:$PATH" +export EDITOR="lvim" + +[ -f "/home/sgoudham/.ghcup/env" ] && source "/home/sgoudham/.ghcup/env" # ghcup-env + +eval "$(zoxide init zsh)" +#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="$HOME/.sdkman" +[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"