Skip to content

Instantly share code, notes, and snippets.

@themagicalmammal
Created December 22, 2021 05:23
Show Gist options
  • Save themagicalmammal/55a334712d458d82f92cf52044136c10 to your computer and use it in GitHub Desktop.
Save themagicalmammal/55a334712d458d82f92cf52044136c10 to your computer and use it in GitHub Desktop.
My Bash (Void Setup)
# .bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
eval "$(starship init bash)"
# Awesome Alias
## System commands
alias _='sudo'
alias ls='ls --color=auto'
alias tarnow='tar -acf'
alias untar='tar -zxvf'
alias wget='wget -c'
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias diff='diff --color=auto'
alias clrk='sudo vkpurge rm all'
## Improved commands
alias ls='lsd --group-dirs first'
alias lt='lsd --tree'
alias top='htop'
alias cat='bat --pager=never --theme=ansi'
alias catf='bat --theme=ansi'
## XBPS
alias xu='sudo xbps-install -Suv'
alias xi='sudo xbps-install'
alias xr='sudo xbps-remove -Rcon'
alias xfr='sudo xbps-remove -Rcon -F'
alias xl='xbps-query -l'
alias xf='xl | grep'
alias xs='xbps-query -Rs'
alias xd='xbps-query -x'
## Flatpak
alias fu='flatpak update'
alias fi='flatpak install'
alias ff='flatpak repair'
alias fs='flatpak search'
alias fl='flatpak list'
alias fr='flatpak uninstall --delete-data'
alias fc='flatpak uninstall –-unused'
### alias fe='flatpak uninstall --all'
## Nix
alias nu='nix-env -u'
alias nf='nix-env --query'
alias na='nix-env --query "*"'
alias ni='nix-env -i'
alias nr='nix-env -e'
alias ns='nix search'
alias no='nix-env --rollback'
alias ncl='nix-channel --list'
alias nca='nix-channel --add'
alias ncu='nix-channel --update'
## Specials
alias b='bleachbit'
alias be='_ bleachbit'
alias fre='sudo fc-cache -f -v && fc-cache -f -v'
alias cu='xu && nu && fu'
## System Controls
alias halt='sudo halt'
alias poweroff='sudo poweroff'
alias reboot='sudo reboot'
alias shutdown='sudo shutdown'
alias zzz='sudo zzz'
@themagicalmammal
Copy link
Author

Requirements

  1. lsd
  2. starship
  3. bat

Also you need my starship config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment