dotfiles/zsh/.zshrc

88 lines
2.0 KiB
Bash
Raw Normal View History

2019-03-11 23:59:49 +01:00
# Paths
export ZSH="$HOME/.oh-my-zsh"
export PATH="$PATH:$HOME/.go/bin:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.dotnet/tools:$HOME/.emacs.d/bin"
2019-12-04 01:32:36 +01:00
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export PenTestTools=$HOME/Local/PenTesting/
export CTF=$HOME/Documents/CTF/
export WORKSPACE=$HOME/workspace_l
export ZSHRC="$HOME/.zshrc"
export VISUAL="nvim"
export EDITOR="nvim"
2021-05-29 21:46:59 +02:00
# History
export HISTSIZE=50000
export SAVEHIST=50000
2021-05-29 21:46:59 +02:00
export HISTTIMEFORMAT="[%F %T] "
# Following commands from: https://registerspill.thorstenball.com/p/which-command-did-you-run-1731-days
# Immediately append to history file:
setopt INC_APPEND_HISTORY
# Record timestamp in history:
2021-05-29 21:46:59 +02:00
setopt EXTENDED_HISTORY
# Expire duplicate entries first when trimming history:
setopt HIST_EXPIRE_DUPS_FIRST
# Dont record an entry that was just recorded again:
setopt HIST_IGNORE_DUPS
# Delete old recorded entry if new entry is a duplicate:
setopt HIST_IGNORE_ALL_DUPS
# Do not display a line previously found:
2021-05-29 21:46:59 +02:00
setopt HIST_FIND_NO_DUPS
# Dont record an entry starting with a space:
setopt HIST_IGNORE_SPACE
# Dont write duplicate entries in the history file:
setopt HIST_SAVE_NO_DUPS
# Share history between all sessions:
setopt SHARE_HISTORY
# Alias
alias q="exit"
alias vim="nvim"
alias cat="bat --pager=never"
alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"'
2019-03-11 23:59:49 +01:00
alias xsel='xsel -ib'
alias df="df -h"
alias picpaste="xclip -selection clipboard -t image/png -o"
alias wttr="curl wttr.in/Essen"
alias notify="dunstify \"ping~\""
alias latexmk="latexmk -f -pdf -interaction=nonstopmode"
alias picotik="picocom --b 115200 /dev/ttyUSB0"
2019-03-11 23:59:49 +01:00
# Theme
ZSH_THEME="agnoster"
2019-03-11 23:59:49 +01:00
# Plugins
plugins=(
git
history
2021-05-29 21:46:59 +02:00
z
zsh-eza
2019-03-11 23:59:49 +01:00
)
2018-10-05 21:21:11 +02:00
randpw() { < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-$1};echo;};
autoload -U +X bashcompinit && bashcompinit
if [[ -z "$ZELLIJ" ]]; then
if [[ "$ZELLIJ_AUTO_ATTACH" == "true" ]]; then
zellij attach -c
else
zellij
fi
if [[ "$ZELLIJ_AUTO_EXIT" == "true" ]]; then
exit
fi
fi
# Source
source $ZSH/oh-my-zsh.sh