|
|
|
# vim:ft=zsh:fenc=utf-8
|
|
|
|
|
|
|
|
# Prompt
|
|
|
|
eval "$(starship init zsh)"
|
|
|
|
|
|
|
|
# Plugins - 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
|
|
|
|
|
|
|
|
# Make 'less' friendlier for non-text input files, see lesspipe(1)
|
|
|
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
|
|
|
|
|
|
|
# Forcing 256 bit colour
|
|
|
|
export TERM=xterm-256color
|
|
|
|
|
|
|
|
# Keep History
|
|
|
|
export HISTFILE="$HOME/.zhistory"
|
|
|
|
export HISTSIZE=10000
|
|
|
|
export SAVEHIST=10000
|
|
|
|
setopt HIST_IGNORE_ALL_DUPS
|
|
|
|
setopt HIST_IGNORE_DUPS
|
|
|
|
|
|
|
|
# Coloured GCC warnings and errors
|
|
|
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
|
|
|
|
|
|
# Color support of 'ls' and also add aliases
|
|
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Display images in the terminal
|
|
|
|
function icat() {
|
|
|
|
if [ "$TERM_PROGRAM" = "WezTerm" ]; then
|
|
|
|
wezterm imgcat "$@"
|
|
|
|
elif [ "$TERM" = "xterm-kitty" ]; then
|
|
|
|
kitty +kitten icat "$@"
|
|
|
|
else
|
|
|
|
echo 'No image viewer defined for this terminal'
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# export PATH="$PATH:$HOME/.local/share/scripts"
|
|
|
|
# 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"
|
|
|
|
|
|
|
|
# PATH
|
|
|
|
export PATH="$PATH:$HOME/.local/bin"
|
|
|
|
export PATH="$PATH:$HOME/.local/scripts"
|
|
|
|
|
|
|
|
# Rust
|
|
|
|
. "$HOME/.cargo/env"
|
|
|
|
|
|
|
|
# Go
|
|
|
|
export PATH="$PATH:$HOME/.local/share/go/bin"
|
|
|
|
|
|
|
|
# Haskell (ghcup-env)
|
|
|
|
[ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env"
|
|
|
|
|
|
|
|
# Node
|
|
|
|
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
|
|
|
|
|
|
|
|
# . "$HOME/.config/wezterm/wezterm.sh"
|