initial commit
This commit is contained in:
66
internal/config/embedded/.zshrc
Normal file
66
internal/config/embedded/.zshrc
Normal file
@@ -0,0 +1,66 @@
|
||||
fastfetch
|
||||
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# Default exports
|
||||
export PATH="$PATH:/usr/bin/alacritty"
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$PATH:/opt/nvim-linux64/bin"
|
||||
fpath+=(${ZDOTDIR:-$HOME}/.zsh_functions)
|
||||
export EDITOR=nvim
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
|
||||
HISTFILE=$HOME/.zhistory
|
||||
SAVEHIST=1000
|
||||
HISTSIZE=999
|
||||
|
||||
setopt share_history
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_verify
|
||||
|
||||
# Tmux on by default
|
||||
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
|
||||
|
||||
# Completion using arrow keys (based on history)
|
||||
bindkey '^[[A' history-search-backward
|
||||
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
|
||||
zstyle ':completion:*' max-errors 5
|
||||
zstyle :compinstall filename '$HOME/.zshrc'
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# Set aliases
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
alias vim="nvim"
|
||||
alias cd="z"
|
||||
alias ls="eza --icons=always"
|
||||
alias sudo="doas"
|
||||
|
||||
# Enable and set vim keybindings
|
||||
set -o vi
|
||||
|
||||
bindkey -M viins 'jk' vi-cmd-mode
|
||||
bindkey -M vicmd '^R' history-incremental-search-backward # Ctrl+R for reverse search
|
||||
bindkey -M vicmd '/' history-incremental-search-backward # / for history search
|
||||
bindkey -M vicmd '?' history-incremental-search-forward # ? for forward search
|
||||
bindkey -M viins '^U' backward-kill-line # Ctrl+U to clear line in insert mode
|
||||
bindkey -M vicmd '^U' backward-kill-line # Ctrl+U to clear line in command mode
|
||||
bindkey -M vicmd '^A' beginning-of-line # Ctrl+A to go to the beginning of the line in command mode
|
||||
bindkey -M vicmd '^E' end-of-line # Ctrl+E to go to the end of the line in command mode
|
||||
|
||||
#source plugins
|
||||
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
source ~/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
||||
|
||||
Reference in New Issue
Block a user