summaryrefslogtreecommitdiff
path: root/home/config/zsh/zshrc
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-10-22 22:45:46 -0400
committerFreya Murphy <freya@freyacat.org>2024-10-22 22:45:46 -0400
commit64d3d91014479cdfbc2f44bc71e667700b32612b (patch)
tree36b1d44e966c696f6ec06d49876330763828a244 /home/config/zsh/zshrc
parentupdate openssh config (diff)
downloaddotfiles-guix-64d3d91014479cdfbc2f44bc71e667700b32612b.tar.gz
dotfiles-guix-64d3d91014479cdfbc2f44bc71e667700b32612b.tar.bz2
dotfiles-guix-64d3d91014479cdfbc2f44bc71e667700b32612b.zip
add base home config
Diffstat (limited to 'home/config/zsh/zshrc')
-rw-r--r--home/config/zsh/zshrc85
1 files changed, 19 insertions, 66 deletions
diff --git a/home/config/zsh/zshrc b/home/config/zsh/zshrc
index 7fe8642..add2cf3 100644
--- a/home/config/zsh/zshrc
+++ b/home/config/zsh/zshrc
@@ -23,13 +23,18 @@ set -o vi
set show-mode-in-prompt on
# Set shell prompt using starship
-eval "$(starship init zsh)"
+if command -v "starship" > /dev/null; then
+ eval "$(starship init zsh)"
+else
+ export PS1="$$USER: "
+fi
-# Set guix reconfigure aliases
+# 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"
+alias reconfigure-user="guix home -L $HOME/.config/guix/modules reconfigure $HOME/.config/guix/home/home.scm"
+alias reconfigure-nix="home-manager switch"
-# Set other usefull aliases
+# aliases
alias neo="pfetch"
alias rf="rm -fr" # remove le french hon hon hon
alias ls="ls --color=auto"
@@ -38,10 +43,8 @@ alias grep="grep --color=auto"
alias diff="diff --color=auto"
alias ccat="highlight --out-format=ansi"
alias vim="nvim"
-#alias show="kitten icat --align=left"
-#alias ssh="kitten ssh"
-# Have manpages use colors
+# manpages
export LESS_TERMCAP_md=$'\e[1;36m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
@@ -50,18 +53,14 @@ 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 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)
-# Enable zsh keybinds for home, end, and other movement keybinds
+# keybinds
bindkey "\e[1;5D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\e[3;5~" kill-word
@@ -71,6 +70,7 @@ bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
bindkey "\e\d" undo
+# ranger
.ranger() {
ranger --choosedir=$HOME/.rangerdir < $TTY
LASTDIR=$(cat $HOME/.rangerdir)
@@ -78,62 +78,15 @@ bindkey "\e\d" undo
zle reset-prompt
}
-zle -N reload .reload
-bindkey "^R" reload
zle -N ranger .ranger
bindkey "^F" range
-# GPG SETUP FOR SSH
+# gpg
export GPG_TTY=$(tty)
-#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
# ricing
export PF_CUSTOM_LOGOS="/home/freya/.config/zsh/pfetch_logos"
-_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"
-
-_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"
-
-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}
-}
-
pfetch
PWD="$HOME"