2023-11-27 18:03:12 +00:00
|
|
|
# Zsh shell initalization file
|
|
|
|
|
|
|
|
# Export 'SHELL' to child processes
|
|
|
|
export SHELL
|
|
|
|
|
|
|
|
if [[ $- != *i* ]]
|
|
|
|
then
|
|
|
|
# We are being invoked from a non-interactive shell. If this
|
|
|
|
# is an SSH session (as in "ssh host command"), source
|
|
|
|
# /etc/profile so we get PATH and other essential variables.
|
|
|
|
[[ -n "$SSH_CLIENT" ]] && source /etc/profile
|
|
|
|
|
|
|
|
# Don't do anything else.
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
PATH=$PATH:$HOME/.cargo/bin
|
|
|
|
PATH=$PATH:$HOME/.local/bin
|
2024-04-05 19:11:06 +00:00
|
|
|
PATH=$PATH:$HOME/.symfony5/bin
|
|
|
|
PATH=$PATH:$HOME/.local/share/yabridge
|
2023-11-27 18:03:12 +00:00
|
|
|
|
|
|
|
# vim mode >:)
|
|
|
|
# no ryan i am not copying you
|
|
|
|
set -o vi
|
|
|
|
set show-mode-in-prompt on
|
|
|
|
|
|
|
|
# Set shell prompt using starship
|
|
|
|
eval "$(starship init zsh)"
|
|
|
|
|
|
|
|
# Set other usefull aliases
|
|
|
|
alias neo="pfetch"
|
|
|
|
alias rf="rm -fr" # remove le french hon hon hon
|
|
|
|
alias config="/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME"
|
|
|
|
alias ls="ls --color=auto"
|
2023-11-28 14:44:11 +00:00
|
|
|
alias ip="ip --color=auto"
|
|
|
|
alias grep="grep --color=auto"
|
|
|
|
alias diff="diff --color=auto"
|
|
|
|
alias ccat="highlight --out-format=ansi"
|
2024-01-22 23:34:10 +00:00
|
|
|
alias vim="nvim"
|
|
|
|
alias show="kitten icat --align=left"
|
2024-04-05 19:11:06 +00:00
|
|
|
alias ssh="kitten ssh"
|
2023-11-27 18:03:12 +00:00
|
|
|
|
|
|
|
# Have manpages use colors
|
2023-11-29 01:00:01 +00:00
|
|
|
export LESS_TERMCAP_md=$'\e[1;36m'
|
|
|
|
export LESS_TERMCAP_me=$'\e[0m'
|
|
|
|
export LESS_TERMCAP_se=$'\e[0m'
|
|
|
|
export LESS_TERMCAP_so=$'\e[1;92m'
|
|
|
|
export LESS_TERMCAP_ue=$'\e[0m'
|
|
|
|
export LESS_TERMCAP_us=$'\e[1;35m'
|
|
|
|
export GROFF_NO_SGR=1
|
2023-11-27 18:03:12 +00:00
|
|
|
|
2023-12-05 00:22:07 +00:00
|
|
|
.reload() {
|
|
|
|
# Enable zsh auto suggestions
|
|
|
|
autoload compinit && compinit
|
|
|
|
source $HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
|
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
|
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#696e8a"
|
|
|
|
ZSH_AUTOSUGGEST_STRATEGY=(completion history)
|
|
|
|
}
|
2023-11-28 14:44:11 +00:00
|
|
|
|
2024-04-05 19:11:06 +00:00
|
|
|
.reload
|
2023-11-27 18:03:12 +00:00
|
|
|
|
|
|
|
# Enable zsh keybinds for home, end, and other movement keybinds
|
|
|
|
bindkey "\e[1;5D" backward-word
|
|
|
|
bindkey "\e[1;5C" forward-word
|
|
|
|
bindkey "\e[3;5~" kill-word
|
|
|
|
bindkey "\C-_" backward-kill-word
|
|
|
|
bindkey "\e[3~" delete-char
|
|
|
|
bindkey "\e[H" beginning-of-line
|
|
|
|
bindkey "\e[F" end-of-line
|
|
|
|
bindkey "\e\d" undo
|
|
|
|
|
2024-04-05 19:11:06 +00:00
|
|
|
.ranger() {
|
2024-01-22 23:34:10 +00:00
|
|
|
ranger --choosedir=$HOME/.rangerdir < $TTY
|
|
|
|
LASTDIR=$(cat $HOME/.rangerdir)
|
|
|
|
cd "$LASTDIR"
|
|
|
|
zle reset-prompt
|
|
|
|
}
|
|
|
|
|
2023-12-05 00:22:07 +00:00
|
|
|
zle -N reload .reload
|
|
|
|
bindkey "^R" reload
|
2024-01-22 23:34:10 +00:00
|
|
|
zle -N ranger .ranger
|
|
|
|
bindkey "^F" ranger
|
2023-12-05 00:22:07 +00:00
|
|
|
|
2023-11-27 18:03:12 +00:00
|
|
|
# GPG SETUP FOR SSH
|
|
|
|
export GPG_TTY=$(tty)
|
|
|
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
|
|
|
|
|
|
# ricing
|
|
|
|
export PF_CUSTOM_LOGOS="/home/freya/.config/pfetch_logos"
|
2024-04-05 19:11:06 +00:00
|
|
|
|
|
|
|
export WINEARCH=win32
|
|
|
|
export WINEPREFIX=/home/freya/.wine
|
|
|
|
|
2023-11-27 18:03:12 +00:00
|
|
|
pfetch
|