gentoo-dots/.config/zsh/.zshrc

67 lines
1.6 KiB
Bash
Raw Normal View History

2023-04-30 17:36:12 +02:00
#!/bin/sh
pfetch
eval "$(starship init zsh)"
[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"
zstyle ':completion:*' rehash true
# Plugins
plug "kutsan/zsh-system-clipboard"
plug "hlissner/zsh-autopair"
plug "zap-zsh/supercharge"
plug "zap-zsh/completions"
plug "zap-zsh/vim"
plug "zsh-users/zsh-autosuggestions"
plug "zsh-users/zsh-completions"
2023-08-23 19:51:32 +02:00
plug "chivalryq/git-alias"
plug "zdharma-continuum/fast-syntax-highlighting"
plug "zsh-users/zsh-history-substring-search"
plug "MichaelAquilina/zsh-you-should-use"
2023-10-22 11:33:38 +02:00
# Startup zoxide
eval "$(zoxide init zsh)"
2023-08-23 19:51:32 +02:00
# Substring search settings
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold"
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=black,bold'
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
2023-04-30 17:36:12 +02:00
# Plugin settings
if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
ZSH_SYSTEM_CLIPBOARD_METHOD="xsc"
else
ZSH_SYSTEM_CLIPBOARD_METHOD="wlc"
fi
# Local source
plug "$XDG_CONFIG_HOME/zsh/aliases.zsh"
plug "$XDG_CONFIG_HOME/zsh/functions.zsh"
# History settings
setopt appendhistory
setopt INC_APPEND_HISTORY
export HISTTIMEFORMAT="[%F %T]"
HISTFILE="$XDG_STATE_HOME"/zsh/history
2023-08-23 19:51:32 +02:00
[ -n "$NNNLVL" ] && PS1="N$NNNLVL $PS1"
2023-11-07 18:44:52 +01:00
# cd on nnn quiting
2023-08-23 19:51:32 +02:00
nnn_cd ()
{
if ! [ -z "$NNN_PIPE" ]; then
printf "%s\0" "0c${PWD}" > "${NNN_PIPE}" !&
fi
}
trap nnn_cd EXIT
# Check if in tmux and if a venv directory exists activate the python environment
if [ ! -z "$TMUX" ] && [ -d "./env" ]; then
. ./env/bin/activate
fi