chore(zsh): cleanup zsh config
This commit is contained in:
parent
dc19d04ba3
commit
8406b0395a
4 changed files with 20 additions and 53 deletions
|
@ -1,11 +1,6 @@
|
||||||
#This is used to reload the instance
|
export EDITOR=nvim
|
||||||
if [[ ! $(tty) =~ ^/dev/tty[0-9]*$ ]]; then
|
export VISUAL=nvim
|
||||||
TRAPUSR1() {
|
export READER=mupdf
|
||||||
if [[ -o INTERACTIVE ]]; then
|
|
||||||
exec "${SHELL}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||||
export XDG_CACHE_HOME="${HOME}/.cache"
|
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||||
|
@ -13,17 +8,16 @@ export XDG_DATA_HOME="${HOME}/.local/share"
|
||||||
export XDG_STATE_HOME="${HOME}/.local/state"
|
export XDG_STATE_HOME="${HOME}/.local/state"
|
||||||
export XDG_RUNTIME_DIR=/tmp
|
export XDG_RUNTIME_DIR=/tmp
|
||||||
|
|
||||||
# Add exports
|
export GOPATH="$HOME/go"
|
||||||
|
export GOBIN="$GOPATH/bin"
|
||||||
|
|
||||||
|
# OS-specific exports
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
if [[ $(uname) == "Darwin" ]]; then
|
||||||
#ONLY MACOS
|
|
||||||
export JAVA_HOME=$(/usr/libexec/java_home)
|
export JAVA_HOME=$(/usr/libexec/java_home)
|
||||||
|
export GEM_HOME=$HOME/.gem
|
||||||
export PATH="/opt/homebrew/bin:$PATH"
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
export PATH="/opt/homebrew/opt/texlive/bin:$PATH"
|
export PATH="/opt/homebrew/opt/texlive/bin:$PATH"
|
||||||
export GEM_HOME=$HOME/.gem
|
|
||||||
export PATH=$PATH:$GEM_HOME/bin
|
export PATH=$PATH:$GEM_HOME/bin
|
||||||
else
|
|
||||||
#ONLY LINUX
|
|
||||||
export LIBVA_DRIVER_NAME=nvidia
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,12 +28,6 @@ export PATH="$HOME/.local/bin:$PATH"
|
||||||
export PATH="$HOME/go/bin:$PATH"
|
export PATH="$HOME/go/bin:$PATH"
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
export PATH="$HOME/.ghcup/bin:$PATH"
|
export PATH="$HOME/.ghcup/bin:$PATH"
|
||||||
export PATH="$HOME/.miniforge3/bin:$PATH"
|
|
||||||
export PATH="$HOME/.cabal/bin:$PATH"
|
export PATH="$HOME/.cabal/bin:$PATH"
|
||||||
export PATH="$XDG_CONFIG_HOME/emacs/bin:$PATH"
|
|
||||||
|
|
||||||
export GOPATH="$HOME/go"
|
|
||||||
export GOBIN="$GOPATH/bin"
|
|
||||||
|
|
||||||
|
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
|
|
|
@ -1,26 +1,9 @@
|
||||||
# Setup History
|
if [[ -z "$TMUX" ]]; then
|
||||||
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
|
tmux new-session -A -s 0
|
||||||
HISTSIZE=100000000
|
fi
|
||||||
SAVEHIST=100000000
|
|
||||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
|
||||||
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
|
|
||||||
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
|
|
||||||
setopt SHARE_HISTORY # Share history between all sessions.
|
|
||||||
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
|
|
||||||
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
|
|
||||||
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
|
|
||||||
setopt HIST_SAVE_NO_DUPS
|
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
|
||||||
setopt HIST_VERIFY
|
|
||||||
|
|
||||||
#Set EDITOR AND READER
|
source $ZDOTDIR/setup-history.zsh
|
||||||
export EDITOR=nvim
|
|
||||||
export VISUAL=nvim
|
|
||||||
export READER=mupdf
|
|
||||||
|
|
||||||
#Prompt
|
|
||||||
source $ZDOTDIR/prompts/simple-two-line.zsh
|
source $ZDOTDIR/prompts/simple-two-line.zsh
|
||||||
|
|
||||||
source $ZDOTDIR/functions.zsh
|
source $ZDOTDIR/functions.zsh
|
||||||
source $ZDOTDIR/plugins.zsh
|
source $ZDOTDIR/plugins.zsh
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,7 @@ function routevpn {
|
||||||
|
|
||||||
alias ls="eza --icons -l --sort type"
|
alias ls="eza --icons -l --sort type"
|
||||||
alias lg="lazygit"
|
alias lg="lazygit"
|
||||||
alias calcurse-caldav='CALCURSE_CALDAV_PASSWORD=$(keyring get caldav afonso) calcurse-caldav'
|
|
||||||
alias routes="netstat -rn -f inet"
|
alias routes="netstat -rn -f inet"
|
||||||
|
|
||||||
alias lc='lazygit --work-tree="$HOME" --git-dir="$HOME/dotfiles"'
|
alias lc='lazygit --work-tree="$HOME" --git-dir="$HOME/dotfiles"'
|
||||||
alias config='git --work-tree="$HOME" --git-dir="$HOME/dotfiles"'
|
alias config='git --work-tree="$HOME" --git-dir="$HOME/dotfiles"'
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,21 @@
|
||||||
#Completions
|
# Completions
|
||||||
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion)
|
|
||||||
zstyle ':completion:*' rehash true
|
zstyle ':completion:*' rehash true
|
||||||
fpath+=$ZDOTDIR/plugins/zsh-completions/src
|
fpath+=$ZDOTDIR/plugins/zsh-completions/src
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
|
|
||||||
|
# Autosuggestions
|
||||||
|
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion)
|
||||||
source $ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
|
source $ZDOTDIR/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
|
||||||
|
|
||||||
|
# Syntax Highlighting
|
||||||
source $ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
|
source $ZDOTDIR/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
|
||||||
|
|
||||||
source $ZDOTDIR/plugins/zsh-history-substring-search/zsh-history-substring-search.plugin.zsh
|
# Fzf-Tab
|
||||||
|
|
||||||
zvm_after_init_commands+=('source <(fzf --zsh) && enable-fzf-tab')
|
zvm_after_init_commands+=('source <(fzf --zsh) && enable-fzf-tab')
|
||||||
source $ZDOTDIR/plugins/fzf-tab/fzf-tab.plugin.zsh
|
source $ZDOTDIR/plugins/fzf-tab/fzf-tab.plugin.zsh
|
||||||
|
|
||||||
|
# Vi mode
|
||||||
source $ZDOTDIR/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
source $ZDOTDIR/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||||
|
|
||||||
|
# MacOS
|
||||||
source $ZDOTDIR/plugins/zsh-macos.plugin.zsh
|
source $ZDOTDIR/plugins/zsh-macos.plugin.zsh
|
||||||
|
|
||||||
source $ZDOTDIR/plugins/zsh-git.plugin.zsh
|
|
||||||
|
|
||||||
source $ZDOTDIR/plugins/zsh-sudo.plugin.zsh
|
|
||||||
|
|
||||||
source $ZDOTDIR/plugins/zsh-tmux/zsh-tmux.plugin.zsh
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue