From 579e1642ebdf438559218701e8b91789cf58b65b Mon Sep 17 00:00:00 2001 From: Badstagram Date: Sun, 12 Oct 2025 02:30:05 +0100 Subject: [PATCH] initial --- dot_zsh_aliases | 32 ++++++++++ dot_zshrc | 90 +++++++++++++++++++++++++++++ executable_dot_zsh_plugin_loader.sh | 11 ++++ 3 files changed, 133 insertions(+) create mode 100644 dot_zsh_aliases create mode 100644 dot_zshrc create mode 100644 executable_dot_zsh_plugin_loader.sh diff --git a/dot_zsh_aliases b/dot_zsh_aliases new file mode 100644 index 0000000..93cd86f --- /dev/null +++ b/dot_zsh_aliases @@ -0,0 +1,32 @@ +# Change 'ls' to 'eza' +alias eza='eza --icons --color=always --group-directories-first' +alias ls='eza -al' +alias la='eza -a' +alias ll='eza -l' + +# Vim +alias vim='nvim' +alias vi='nvim' +alias v='nvim' +alias v.='nvim .' + +alias cls='clear' + +alias grep='grep --color=auto' + +alias rl='source ~/.zshrc; source ~/.zsh_aliases' + +# Change sudo to doas +alias sudo="doas" + +# Power +alias rbn="sudo reboot now" +alias sdn="sudo poweroff" + +# Pacman +alias pacin="sudo pacman -S" +alias pacupd="sudo pacman -Syu" + +# Up +alias ..="cd .." +alias ...="cd ../.." diff --git a/dot_zshrc b/dot_zshrc new file mode 100644 index 0000000..890a9c1 --- /dev/null +++ b/dot_zshrc @@ -0,0 +1,90 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Env +export EDITOR=nvim + + +# Keybinds +bindkey -M emacs '^H' backward-kill-word # ctrl + bksp = delete word before cursor +bindkey -M emacs '^[[3;5~' kill-word # ctrl + del = delete word after cursor +bindkey -M emacs '^[[1;5D' backward-word # ctrl +  = move cursor to start of last word +bindkey -M emacs '^[[1;5C' forward-word # ctrl +  = move cursor to end of next word + +# fnm +FNM_PATH="/home/bad/.local/share/fnm" +if [ -d "$FNM_PATH" ]; then + export PATH="$FNM_PATH:$PATH" + eval "`fnm env`" +fi +. "$HOME/.cargo/env" + +# bun +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:/opt/android-sdk/platform-tools:$PATH" + +if [ -f "$HOME/.zsh_aliases" ]; then + source $HOME/.zsh_aliases +fi + +eval "$(starship init zsh)" + +# Archive Extraction +# Taken from https://gitlab.com/dwt1/dotfiles + +function ex { + if [ -z "$1" ]; then + # display usage if no parameters given + echo "Usage: ex ." + echo " extract [path/file_name_2.ext] [path/file_name_3.ext]" + else + for n in "$@" + do + if [ -f "$n" ] ; then + case "${n%,}" in + *.cbt|*.tar.bz2|*.tar.gz|*.tar.xz|*.tbz2|*.tgz|*.txz|*.tar) + tar xvf "$n" ;; + *.lzma) unlzma ./"$n" ;; + *.bz2) bunzip2 ./"$n" ;; + *.cbr|*.rar) unrar x -ad ./"$n" ;; + *.gz) gunzip ./"$n" ;; + *.cbz|*.epub|*.zip) unzip ./"$n" ;; + *.z) uncompress ./"$n" ;; + *.7z|*.arj|*.cab|*.cb7|*.chm|*.deb|*.dmg|*.iso|*.lzh|*.msi|*.pkg|*.rpm|*.udf|*.wim|*.xar) + 7z x ./"$n" ;; + *.xz) unxz ./"$n" ;; + *.exe) cabextract ./"$n" ;; + *.cpio) cpio -id < ./"$n" ;; + *.cba|*.ace) unace x ./"$n" ;; + *) + echo "ex: '$n' - unknown archive method" + return 1 + ;; + esac + else + echo "'$n' - file does not exist" + return 1 + fi + done +fi +} + + +autoload -U compinit +compinit + +# plugins +if [ -f "$HOME/.zsh_plugin_loader.sh" ]; then + . $HOME/.zsh_plugin_loader.sh +fi + + +. "$HOME/.local/bin/env" + + +export PATH=$PATH:/home/bad/.spicetify +export PATH=$PATH:/home/bad/bin diff --git a/executable_dot_zsh_plugin_loader.sh b/executable_dot_zsh_plugin_loader.sh new file mode 100644 index 0000000..9318793 --- /dev/null +++ b/executable_dot_zsh_plugin_loader.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh + + +autoload -U compinit +compinit + +ZSH_PLUGIN_DIR='/home/bad/.config/zsh-plugins' +source "$ZSH_PLUGIN_DIR/zsh-syntax-highlighting/catppuccin_macchiato-zsh-syntax-highlighting.zsh" +source "$ZSH_PLUGIN_DIR/git.plugin.zsh" +source "$ZSH_PLUGIN_DIR/zsh-autosuggestions/zsh-autosuggestions.zsh" +source "$ZSH_PLUGIN_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" # This must be the LAST plugin to be loaded