65 lines
2.1 KiB
Bash
65 lines
2.1 KiB
Bash
# Starship
|
|
export STARSHIP_CONFIG="$HOME/.config/starship/starship.toml"
|
|
eval "$(starship init zsh)"
|
|
|
|
# zoxide - a better cd command
|
|
eval "$(zoxide init zsh)"
|
|
|
|
# Activate syntax highlighting
|
|
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
|
|
# Disable underline
|
|
(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
|
|
ZSH_HIGHLIGHT_STYLES[path]=none
|
|
ZSH_HIGHLIGHT_STYLES[path_prefix]=none
|
|
|
|
# Activate autosuggestions
|
|
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
|
|
# ------------FZF--------------
|
|
# Set up fzf key bindings and fuzzy completion
|
|
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git "
|
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
|
export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git"
|
|
|
|
export FZF_DEFAULT_OPTS="--height 50% --layout=default --border --color=hl:#2dd4bf"
|
|
|
|
# Setup fzf previews
|
|
export FZF_CTRL_T_OPTS="--preview 'bat --color=always -n --line-range :500 {}'"
|
|
export FZF_ALT_C_OPTS="--preview 'eza --icons=always --tree --color=always {} | head -200'"
|
|
|
|
# fzf preview for tmux
|
|
export FZF_TMUX_OPTS=" -p90%,70% "
|
|
# -----------------------------
|
|
|
|
# Themes (onedark or nord)
|
|
export TMUX_THEME="nord"
|
|
export NVIM_THEME="nord"
|
|
export STARSHIP_THEME="nord"
|
|
export WEZTERM_THEME="nord"
|
|
|
|
lt() {
|
|
local level=${1:-3}
|
|
shift
|
|
eza --tree --level "$level" "$@"
|
|
}
|
|
|
|
# aliases
|
|
alias weztermconfig="nvim ~/.config/wezterm/wezterm.lua"
|
|
alias zshconfig="vim ~/.zshrc"
|
|
alias nvimconfig="vim ~/.config/nvim"
|
|
alias dev="cd $HOME/Documents"
|
|
alias ls="eza --no-filesize --long --color=always --icons=always --no-user"
|
|
alias ll="eza -lah --group-directories-first --no-filesize --long --color=always --icons=always --no-user"
|
|
alias lt="eza --tree --level"
|
|
alias vim="nvim"
|
|
alias crq="cargo run -q"
|
|
|
|
if command -v tmux &>/dev/null && [ -z "$TMUX" ]; then
|
|
tmux attach -t default 2>/dev/null || tmux new -s default
|
|
fi
|
|
|
|
|
|
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
|