154 lines
4.6 KiB
Bash
Executable file
154 lines
4.6 KiB
Bash
Executable file
# Lines configured by zsh-newuser-install
|
|
HISTFILE=~/.local/share/histfile
|
|
HISTSIZE=1000
|
|
SAVEHIST=1000
|
|
setopt extendedglob nomatch
|
|
unsetopt autocd beep notify
|
|
unsetopt PROMPT_SP
|
|
bindkey -v
|
|
# End of lines configured by zsh-newuser-install
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
|
export XDG_CACHE_HOME="$HOME/.cache"
|
|
export XDG_DATA_HOME="$HOME/.local/share"
|
|
export XDG_STATE_HOME="$HOME/.local/state"
|
|
|
|
# Aliases
|
|
alias kon="ncmpcpp -b ~/.config/ncmpcpp/bindings"
|
|
alias myip="curl ifconfig.me"
|
|
alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra"
|
|
alias ls='eza'
|
|
alias l='ls -l'
|
|
alias la='ls -la'
|
|
alias ll='ls -l'
|
|
alias lla='ls -la'
|
|
alias v="nvim" # Launch neovim with 'v'
|
|
alias mountUSB="mount /home/flyingstitchman/ExternalDrive" # Automagically mount and unmount my flashdrive
|
|
alias umountUSB="umount /home/flyingstitchman/ExternalDrive"
|
|
alias unityAvi="/home/flyingstitchman/Documents/Unity/Editors/2019.4.31f1/Editor/Unity -projectPath ~/ExternalDrive/Unity\ Projects/Avatar\ 3.0\ 2019"
|
|
alias ssh="TERM=xterm ssh" #Fix foot issue in ssh
|
|
alias gdb="gdb -x /usr/share/pwndbg/gdbinit.py" #pwntools for GDB
|
|
alias make="make -j 20"
|
|
alias cd="z"
|
|
alias imv="imv -b aa77bb"
|
|
alias find="fd"
|
|
alias tree="eza --tree"
|
|
alias icat="kitty +kitten icat"
|
|
alias qsus="NIXPKGS_ALLOW_UNFREE=1 nix-shell -p quartus-prime-lite -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fe7ab74a86d78ba00d144aa7a8da8c71a200c563.tar.gz"
|
|
|
|
# thanks fire :3
|
|
alias c='clear'
|
|
alias lg='lazygit'
|
|
# Future fire, this is for a meme.
|
|
nya() {
|
|
args=$(echo $@ | sed 's/nya/git/g')
|
|
git $args 2>&1 >/dev/null | sed 's/git/nya/g' | sed 's/GIT/NYA/g' | sed 's/Git/Nya/g'
|
|
}
|
|
|
|
# Automatically get new programs for autocompletion
|
|
|
|
zshcache_time="$(date +%s%N)"
|
|
|
|
autoload -Uz add-zsh-hook
|
|
|
|
function osc7-pwd() {
|
|
emulate -L zsh # also sets localoptions for us
|
|
setopt extendedglob
|
|
local LC_ALL=C
|
|
printf '\e]2;%s%s\e\' ${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}}
|
|
}
|
|
|
|
function chpwd-osc7-pwd() {
|
|
(( ZSH_SUBSHELL )) || osc7-pwd
|
|
}
|
|
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
|
|
|
|
|
|
rehash_precmd() {
|
|
if [[ -a /var/cache/zsh/pacman ]]; then
|
|
local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
|
|
if (( zshcache_time < paccache_time )); then
|
|
rehash
|
|
zshcache_time="$paccache_time"
|
|
fi
|
|
fi
|
|
}
|
|
|
|
add-zsh-hook -Uz precmd rehash_precmd
|
|
|
|
# Fancy Term Colors
|
|
|
|
# Load promptinit
|
|
autoload -Uz promptinit && promptinit
|
|
|
|
# Define the theme
|
|
prompt_mytheme_setup() {
|
|
PS1=" %F{#bf80ff}%D{%a %H:%M}%f%F{#400080}-%f%F{#C250B0}%m%f% %F{#400080}@%f%F{#50C0C0}%n%f%F{#40F040}%B %1~%b%f "
|
|
}
|
|
|
|
# Add the theme to promptsys
|
|
prompt_themes+=( mytheme )
|
|
|
|
# Load the theme
|
|
prompt mytheme
|
|
|
|
# The following lines were added by compinstall
|
|
|
|
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
|
|
zstyle ':completion:*' completions ' '
|
|
zstyle ':completion:*' max-errors 3
|
|
|
|
autoload -Uz compinit
|
|
compinit
|
|
# End of lines added by compinstall
|
|
eval "$(zoxide init zsh)"
|
|
|
|
|
|
# Default Programs
|
|
export EDITOR=nvim
|
|
|
|
# Needed for pam_gnupg for ssh keys TO DO
|
|
#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
export PATH="${PATH}:/home/flyingstitchman/.cargo/bin"
|
|
|
|
# Fcitx for Xwayland
|
|
XMODIFIERS=@im=fcitx
|
|
|
|
# Clean Up
|
|
export QT_QPA_PLATFORM=wayland
|
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
|
# Fuck Gnome Devs, All my homies Hate Gnome Devs
|
|
#export GDK_DEBUG=1
|
|
export MBSYNCRC=${XDG_CONFIG_HOME:-~/.config}/mbsync/config
|
|
export PASSWORD_STORE_DIR=${XDG_CONFIG_HOME:-~/.config}/password_store
|
|
export NOTMUCH_CONFIG=${XDG_CONFIG_HOME-~/.config}/notmuch/config
|
|
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
|
|
export KDEHOME="$XDG_CONFIG_HOME"/kde
|
|
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
|
|
export GNUPGHOME=${XDG_DATA_HOME-~/.config}/gnupg
|
|
export GPG_TTY=$(tty)
|
|
export SDL_VIDEODRIVER=wayland
|
|
export GOPATH="$XDG_DATA_HOME"
|
|
export GOMODCACHE="$XDG_CACHE_HOME"
|
|
export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
|
|
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
|
|
export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default
|
|
export DOTNET_CLI_HOME="$XDG_CONFIG_HOME"/dotnet
|
|
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
|
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
|
|
|
|
|
alias dosbox="dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf"
|
|
alias rbs="reconfig switch"
|
|
alias rbb="reconfig build"
|
|
|
|
reconfig() {
|
|
sudo nixos-rebuild --flake "/etc/nixos#$(cat /etc/hostname)" "$@"
|
|
}
|
|
|
|
# Autostart Hyprland after all environmental Variables have been declared
|
|
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
|
# export WLR_DRM_DEVICES=/dev/dri/card0
|
|
exec Hyprland
|
|
fi
|
|
|
|
export QSYS_ROOTDIR="/home/flyingstitchman/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/opt/intelFPGA/21.1/quartus/sopc_builder/bin"
|