This commit is contained in:
Badstagram 2025-10-12 02:30:05 +01:00
commit 579e1642eb
3 changed files with 133 additions and 0 deletions

32
dot_zsh_aliases Normal file
View File

@ -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 ../.."

90
dot_zshrc Normal file
View File

@ -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 <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
echo " extract <path/file_name_1.ext> [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

View File

@ -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