ZSH config files
This commit is contained in:
parent
4238f485c5
commit
093cebd723
3 changed files with 90 additions and 0 deletions
59
home/config/zsh/01-env.zsh
Normal file
59
home/config/zsh/01-env.zsh
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Directories {{{ #
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
export XDG_CACHE_HOME=$HOME/.cache
|
||||
export XDG_DATA_HOME=$HOME/.local/share
|
||||
export XDG_STATE_HOME=$HOME/.local/state
|
||||
# }}} Directories #
|
||||
|
||||
# Wayland {{{{ #
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
# }}}} Wayland
|
||||
|
||||
# Libvirt {{{{
|
||||
export LIBVIRT_DEFAULT_URI="qemu:///session"
|
||||
# }}}} Libvirt #
|
||||
|
||||
# dotnet {{{ #
|
||||
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
|
||||
# }}} dotnet #
|
||||
|
||||
|
||||
# Env Programs {{{ #
|
||||
export EDITOR=nvim
|
||||
export BROWSER=/usr/bin/firefox
|
||||
export GIT_EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
export TERMINAL=alacritty
|
||||
export SOPS_GPG_EXEC=gpg2
|
||||
export CHROME_EXECUTABLE=/usr/bin/chromium
|
||||
export TERM="xterm-256color"
|
||||
# }}} Env Programs #
|
||||
|
||||
# bat settings {{{ #
|
||||
export BAT_THEME="Solarized (dark)"
|
||||
export BAT_STYLE="full"
|
||||
# }}} bat #
|
||||
|
||||
# fzf settings {{{ #
|
||||
_fzf_compgen_path() {
|
||||
fd --hidden --follow --exclude ".git" --exclude ".wine" . "$1"
|
||||
}
|
||||
# Use fd to generate the list for directory completion
|
||||
_fzf_compgen_dir() {
|
||||
fd --type d --hidden --follow --exclude ".git" . "$1"
|
||||
}
|
||||
|
||||
export FZF_DEFAULT_COMMAND='fd --hidden --follow --type f --exclude .git --exclude .wine'
|
||||
export FZF_TMUX=1
|
||||
export FZF_TMUX_HEIGHT=30\%
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_ALT_C_COMMAND='command cat <(fd -t d --exclude .git --exclude .wine) <(fd -t d --hidden --follow --exclude .git --exclude .wine . ~)'
|
||||
export FZF_ALT_C_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
|
||||
# }}} fzf settings #
|
||||
|
||||
# History {{{ #
|
||||
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.cache/zsh/history"
|
||||
[ ! -d $(dirname $HISTFILE) ] && mkdir -p $(dirname $HISTFILE)
|
||||
export HISTSIZE=10000
|
||||
export SAVEHIST=10000
|
||||
# }}} History #
|
14
home/config/zsh/02-plugins.zsh
Normal file
14
home/config/zsh/02-plugins.zsh
Normal file
|
@ -0,0 +1,14 @@
|
|||
[[ -f $ZNAP_HOME/znap.zsh ]] ||
|
||||
git clone --depth 1 https://github.com/marlonrichert/zsh-snap.git $ZNAP_HOME
|
||||
|
||||
source $ZNAP_HOME/znap.zsh
|
||||
|
||||
znap source ohmyzsh/ohmyzsh \
|
||||
plugins/{git,grc,fzf,zoxide,terraform}
|
||||
|
||||
|
||||
command -v golangci-lint &> /dev/null && znap fpath _golangci-lint 'golangci-lint completion zsh'
|
||||
command -v goreleaser &> /dev/null && znap fpath _goreleaser 'goreleaser completion zsh'
|
||||
command -v mockery &> /dev/null && znap fpath _mockery 'mockery completion zsh'
|
||||
|
||||
znap source marlonrichert/zsh-autocomplete
|
17
home/config/zsh/03-aliases.zsh
Normal file
17
home/config/zsh/03-aliases.zsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Editor {{{ #
|
||||
alias vim='nvim'
|
||||
alias vi='nvim'
|
||||
alias edit='nvim'
|
||||
# }}} Editor #
|
||||
|
||||
alias cat='bat'
|
||||
alias grep='grep --color=always'
|
||||
alias exa='exa -lh --git'
|
||||
alias ls=exa
|
||||
alias tree='exa -lh --tree --git'
|
||||
alias df=duf
|
||||
alias ytv='youtube-viewer --video-player=mplayer -novideo'
|
||||
alias ytdlm="youtube-dl --extract-audio --audio-format flac"
|
||||
alias http='http --pretty all --style monokai'
|
||||
alias srm='shred -zvu -n 5'
|
||||
alias dotnet="$HOME/.dotnet/dotnet"
|
Reference in a new issue