Files
dotfiles/dotdot/.zshrc

90 lines
2.1 KiB
Bash

# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
unsetopt beep
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall zstyle :compinstall filename '/home/dqnid/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Path
export NVM_DIR="$HOME/.nvm"
export PATH="/home/dqnid/.local/bin:$PATH"
export TERMINAL=/usr/local/bin/st
# Aliases
alias r=ranger
alias sv="sudo nvim"
alias gs="git status --short"
alias gl="git log --graph --oneline --all"
alias nvm_init='[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"'
alias ls=lsd
alias zj=zellij
alias hx=helix
v() {
kitten @ set-spacing margin=4
nvim $@
kitten @ set-spacing margin=20
}
# nnn
export NNN_OPTS="de" # d for details, e for pipe params, H to auto-display hidden files
export LC_COLLATE="C" # hidden files on top
export NNN_FIFO="/tmp/nnn.fifo" # temporary buffer for the previews
export NNN_FCOLORS="AAAAE631BBBBCCCCDDDD9999"
#AAAAE6
#31BBBB
#CCCCDD
#DD9999
export NNN_PLUG='p:preview-tui'
export SPLIT='v'
n () # to cd on quit
{
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
nnn "$@"
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
eval "$(starship init zsh)"
eval "$(zoxide init zsh)"
# Yazi with cd on quit
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
command yazi "$@" --cwd-file="$tmp"
IFS= read -r -d '' cwd < "$tmp"
[ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd"
rm -f -- "$tmp"
}
export EDITOR=nvim
export NVM_DIR="$HOME/.nvm"
# Slows start time
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# bun completions
[ -s "/home/dqnid/.bun/_bun" ] && source "/home/dqnid/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
export PATH="$HOME/.config/utils/:$PATH"
# yarn
export PATH="$(yarn global bin):$PATH"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion