diff options
Diffstat (limited to 'home/config/zsh')
-rw-r--r-- | home/config/zsh/pfetch_logos | 10 | ||||
-rw-r--r-- | home/config/zsh/zprofile | 93 | ||||
-rw-r--r-- | home/config/zsh/zshrc | 95 |
3 files changed, 198 insertions, 0 deletions
diff --git a/home/config/zsh/pfetch_logos b/home/config/zsh/pfetch_logos new file mode 100644 index 0000000..65c8488 --- /dev/null +++ b/home/config/zsh/pfetch_logos @@ -0,0 +1,10 @@ +[Aa]rch*) + read_ascii 4 <<- EOF + ${c6} /\\ + ${c6} / \\ + ${c6} /\\ \\ + ${c4} / ^ w ^\\ + ${c4} / ,, \\ + ${c4} / | | \\ + ${c4} /_-'' ''-_\\ + EOF diff --git a/home/config/zsh/zprofile b/home/config/zsh/zprofile new file mode 100644 index 0000000..aa2c2ef --- /dev/null +++ b/home/config/zsh/zprofile @@ -0,0 +1,93 @@ +# locale +export LANG=en_US.UTF-8 +export LC_COLLATE=C + +# wayland +export _JAVA_AWT_WM_NONREPARENTING=1 +export MOZ_ENABLE_WAYLAND=1 +export MOZ_USE_XINPUT2=1 +export WLR_NO_HARDWARE_CURSORS=0 +export GDK_BACKEND=wayland,x11 +export SDL_VIDEODRIVER=wayland +export CLUTTER_BACKEND=wayland +export ELM_DISPLAY=wl +export QT_AUTO_SCREEN_SCALE_FACTOR=1 +export QT_QPA_PLATFORM=wayland;xcb +export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 + +# xdg +export XDG_RUNTIME_DIR=/run/user/$(id -u) +export XDG_SESSION_TYPE=wayland +export XDG_CURRENT_DESKTOP=sway +export LIBSEAT_BACKEND=logind + +# programs +export TERMINAL=kitty +export EDITOR=nvim +export CC=$(which gcc) +export LD=$(which gcc) + +# theming + +# ricing +export QT_QPA_PLATFORM_THEME=gtk2 +export GTK_THEME=Lavanda-Sea-Dark +export XCURSOR_THEME=Adwaita +export XCURSOR_SIZE=24 + +# guix +export GUIX_PROFILE=$HOME/.guix-profile +$HOME/.guix-home/on-first-login +. $HOME/.guix-home/setup-environment + +# nix +export NIX_PROFILE=$HOME/.nix-profile +export XDG_DATA_DIRS=$XDG_DATA_DIRS:$NIX_PROFILE/share +export PATH=$PATH:$NIX_PROFILE/bin +export LIBRARY_PATH=$LIBRARY_PATH:$NIX_PROFILE/lib + +# local +export LOCAL_PROFILE=$HOME/.local +export XDG_DATA_DIRS=$XDG_DATA_DIRS:$LOCAL_PROFILE/share +export PATH=$PATH:$LOCAL_PROFILE/bin + +# certs +export SSL_CERT_FILE=/run/current-system/profile/etc/ssl/certs/ca-certificates.crt +export SSL_CERT_DIR=/run/current-system/profile/etc/ssl/certs + +if [ -n "$TMUX" ]; then + return +fi + +clear +printf "\t\n\t\n\t\n\t\n" +printf "\tPlease select an environment...\n" +printf "\t[S]way [H]yprland [T]erminal [E]xit\n" +printf "\t\n\t\n\t" + +while true; do + stty raw -echo + choice=$(dd bs=1 count=1 2> /dev/null) + stty -raw echo + case "$choice" in + "s") + echo "Launching sway..." + export XDG_CURRENT_DESKTOP=sway + exec dbus-run-session sway &> $HOME/.log/sway + ;; + "h") + echo "Launching Hyprland..." + export XDG_CURRENT_DESKTOP=Hyprland + exec dbus-run-session Hyprland &> $HOME/.log/Hyprland + ;; + "t") + exec cage -s kitty -- -o font_size=14 &> $HOME/.log/kitty + ;; + "e") + exit + ;; + "d") + break + ;; + esac +done diff --git a/home/config/zsh/zshrc b/home/config/zsh/zshrc new file mode 100644 index 0000000..29917c9 --- /dev/null +++ b/home/config/zsh/zshrc @@ -0,0 +1,95 @@ +# 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 + +# 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" +alias show="kitten icat --align=left" +alias ssh="kitten ssh" + +# 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) +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + +# ricing +export PF_CUSTOM_LOGOS="/home/freya/.config/zsh/pfetch_logos" + +export WINEARCH=win32 +export WINEPREFIX=/home/freya/.wine + +pfetch |