2024-06-22 02:52:21 +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
|
2024-06-23 18:47:05 +00:00
|
|
|
PATH=$PATH:/var/lib/flatpak/exports/bin
|
2024-06-22 02:52:21 +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 guix reconfigure aliases
|
|
|
|
alias reconfigure-system="sudo -E guix system -L $HOME/.config/guix/modules reconfigure $HOME/.config/guix/systems/$(hostname).scm"
|
|
|
|
alias reconfigure-user="guix home -L $HOME/.config/guix/modules reconfigure $HOME/.config/guix/home/home.scm && home-manager switch"
|
|
|
|
|
|
|
|
# Set other usefull aliases
|
|
|
|
alias neo="pfetch"
|
|
|
|
alias rf="rm -fr" # remove le french hon hon hon
|
|
|
|
alias ls="ls --color=auto"
|
|
|
|
alias ip="ip --color=auto"
|
|
|
|
alias grep="grep --color=auto"
|
|
|
|
alias diff="diff --color=auto"
|
|
|
|
alias ccat="highlight --out-format=ansi"
|
|
|
|
alias vim="nvim"
|
2024-06-23 18:47:05 +00:00
|
|
|
#alias show="kitten icat --align=left"
|
|
|
|
#alias ssh="kitten ssh"
|
2024-06-22 02:52:21 +00:00
|
|
|
|
|
|
|
# Have manpages use colors
|
|
|
|
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
|
|
|
|
|
|
|
|
.reload() {
|
|
|
|
# Enable zsh auto suggestions
|
|
|
|
autoload compinit && compinit
|
|
|
|
source $GUIX_PROFILE/share/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
|
|
source $GUIX_PROFILE/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
|
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#696e8a"
|
|
|
|
ZSH_AUTOSUGGEST_STRATEGY=(completion history)
|
|
|
|
}
|
|
|
|
|
|
|
|
.reload
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
.ranger() {
|
|
|
|
ranger --choosedir=$HOME/.rangerdir < $TTY
|
|
|
|
LASTDIR=$(cat $HOME/.rangerdir)
|
|
|
|
cd "$LASTDIR"
|
|
|
|
zle reset-prompt
|
|
|
|
}
|
|
|
|
|
|
|
|
zle -N reload .reload
|
|
|
|
bindkey "^R" reload
|
|
|
|
zle -N ranger .ranger
|
|
|
|
bindkey "^F" range
|
|
|
|
|
|
|
|
# GPG SETUP FOR SSH
|
|
|
|
export GPG_TTY=$(tty)
|
2024-06-23 18:47:05 +00:00
|
|
|
#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
2024-06-22 02:52:21 +00:00
|
|
|
|
|
|
|
# ricing
|
|
|
|
export PF_CUSTOM_LOGOS="/home/freya/.config/zsh/pfetch_logos"
|
|
|
|
|
2024-08-07 00:13:42 +00:00
|
|
|
_wine() {
|
|
|
|
export WINEPREFIX="$HOME/.wine$1"
|
|
|
|
export WINEARCH="win$1"
|
|
|
|
/usr/bin/wine "${@:2}"
|
|
|
|
unset WINEARCH
|
|
|
|
unset WINEPREFIX
|
|
|
|
}
|
|
|
|
|
|
|
|
alias wine32="_wine 32"
|
|
|
|
alias wine64="_wine 64"
|
|
|
|
|
2024-10-18 04:04:03 +00:00
|
|
|
_winetricks() {
|
|
|
|
export WINEPREFIX="$HOME/.wine$1"
|
|
|
|
export WINEARCH="win$1"
|
|
|
|
/usr/bin/winetricks "${@:2}"
|
|
|
|
unset WINEARCH
|
|
|
|
unset WINEPREFIX
|
|
|
|
}
|
|
|
|
|
|
|
|
alias winetricks32="_winetricks 32"
|
|
|
|
alias winetricks64="_winetricks 64"
|
|
|
|
|
2024-08-07 00:13:42 +00:00
|
|
|
proton() {
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
export STEAM_TMP_DIR="$HOME/.local/share/Steam/steamapps/compatdata/$1"
|
|
|
|
mkdir -p "$STEAM_TMP_DIR"
|
|
|
|
export STEAM_COMPAT_DATA_PATH="$STEAM_TMP_DIR"
|
|
|
|
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$STEAM_TMP_DIR"
|
|
|
|
protonenv "$1"
|
|
|
|
$HOME/.local/share/Steam/steamapps/common/Proton\ -\ Experimental/proton run ${@:2}
|
|
|
|
}
|
|
|
|
|
|
|
|
protontricks() {
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
export STEAM_TMP_DIR="$HOME/.local/share/Steam/steamapps/compatdata/$1"
|
|
|
|
mkdir -p "$STEAM_TMP_DIR"
|
|
|
|
export WINEPREFIX="$STEAM_TMP_DIR"
|
|
|
|
winetricks ${@:2}
|
|
|
|
}
|
2024-06-22 02:52:21 +00:00
|
|
|
|
|
|
|
pfetch
|
2024-08-07 00:13:42 +00:00
|
|
|
|
|
|
|
PWD="$HOME"
|