#!/bin/sh pfetch eval "$(starship init zsh)" # Startup zoxide eval "$(zoxide init zsh)" [ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh" # Plugins plug "kutsan/zsh-system-clipboard" plug "zap-zsh/supercharge" plug "xPMo/zsh-toggle-command-prefix" plug "zap-zsh/completions" plug "zap-zsh/vim" plug "zsh-users/zsh-autosuggestions" plug "zsh-users/zsh-completions" plug "chivalryq/git-alias" plug "zap-zsh/fzf" plug "zdharma-continuum/fast-syntax-highlighting" plug "zsh-users/zsh-history-substring-search" plug "MichaelAquilina/zsh-you-should-use" # VI Mode escape timeout fix export KEYTIMEOUT=1 # 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 # Zsh System keyboard 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 INC_APPEND_HISTORY export HISTTIMEFORMAT="[%F %T]" HISTFILE="$XDG_STATE_HOME"/zsh/history # Add nnn shell level to prompt [ -n "$NNNLVL" ] && PS1="N$NNNLVL $PS1" # cd on nnn quiting 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