halvar@marek-ms7e56 ~> bat .config/fish/config.fish
─────┬─────────────────────────────────────────────────────────────────────────────
│ File: .config/fish/config.fish
─────┼─────────────────────────────────────────────────────────────────────────────
1 │ if status is-interactive
2 │ # Commands to run in interactive sessions can go here
3 │
4 │ function ls
5 │ command eza -alh $argv
6 │ end
7 │
8 │ function last_history_item
9 │ echo $history[1]
10 │ end
11 │ abbr -a !! --position anywhere --function last_history_item
12 │
13 │ function cat
14 │ command bat $argv
15 │ end
16 │
17 │ function nano
18 │ command vim $argv
19 │ end
20 │ end
21 │
─────┴─────────────────────────────────────────────────────────────────────────────
I have a separate, shell-agnostic file. I will clean it up one day, I promise!
## Basic
alias ..='cd ..'
alias 2..='cd ../..'
alias 3..='cd ../../..'
alias 4..='cd ../../../..'
alias 5..='cd ../../../../..'
alias h='cd ~'
alias df='df -h -x tmpfs'
alias du='du -h --max-depth=1 2> /dev/null | sort -h -r | head -n20'
alias free='free -h'
alias mkdir='mkdir -p'
alias wiki='wikiman -q'
alias q='exit'
alias rb='reboot'
alias pwr='shutdown -h'
## Dotfiles
alias n='$EDITOR'
alias sn='sudoedit'
alias g.='cd ~/.config'
alias gc='git clone'
alias gcm='git commit -m'
alias arc='$EDITOR ~/.aliases'
alias drc='$EDITOR ~/.config/dunst/dunstrc'
alias qbrc='$EDITOR ~/.config/qutebrowser/config.py'
if [[ -n "$ZSH_VERSION" ]]; then
alias shrc='$EDITOR ~/.zshrc'
alias rld='clear && source ~/.zshrc'
else
alias shrc='$EDITOR ~/.bashrc'
alias rld='clear && source ~/.bashrc'
fi
if [[ $TERM == "xterm-kitty" ]]; then
alias ktrc='$EDITOR ~/.config/kitty/kitty.conf'
elif [[ $TERM == "alacritty" ]]; then
if [ -n "$WAYLAND_DISPLAY" ]; then
alias ktrc='$EDITOR ~/.config/alacritty/alacritty-wayland.toml'
else
alias ktrc='$EDITOR ~/.config/alacritty/alacritty-xorg.toml'
fi
elif [[ $TERM == "foot" ]]; then
alias ktrc='$EDITOR ~/.config/foot/foot.ini'
fi
## WM-specific
if [[ $XDG_SESSION_DESKTOP == "bspwm" ]]; then
alias wmrc='$EDITOR ~/.config/bspwm/bspwmrc'
alias sxrc='$EDITOR ~/.config/sxhkd/sxhkdrc'
alias pbrc='$EDITOR ~/.config/polybar/config.ini'
elif [[ $XDG_SESSION_DESKTOP == "qtile" || $XDG_SESSION_DESKTOP == "qtile-wayland" ]]; then
alias wmrc='$EDITOR ~/.config/qtile/config.py'
elif [[ $XDG_SESSION_DESKTOP == "river" ]]; then
alias wmrc='$EDITOR ~/.config/river/init'
alias wbrc='$EDITOR ~/.config/waybar/config.jsonc'
alias wbs='$EDITOR ~/.config/waybar/style.css'
elif [[ $XDG_SESSION_DESKTOP == "mango" ]]; then
alias wmrc='$EDITOR ~/.config/mango/config.conf'
alias wbrc='$EDITOR ~/.config/waybar/config-mango.jsonc'
alias wbs='$EDITOR ~/.config/waybar/style.css'
fi
if [[ $(tty) =~ "/dev/tty" ]]; then
alias strc='$EDITOR ~/.config/starship-tty.toml'
else
alias strc='$EDITOR ~/.config/starship-gui.toml'
fi
## Productivity
alias ytmp4="yt-dlp -f 'bv*[height<=1080]+ba/b[height<=1080]' --merge-output-format mp4 --cookies-from-browser brave -N 10"
alias ytmp3="yt-dlp -f 'bestaudio/best' --extract-audio --audio-format mp3 --audio-quality 320k --add-metadata --cookies-from-browser brave -N 10"
alias ping='ping -c 5'
alias stf1='starship explain'
alias updgrub='sudo grub-mkconfig -o /boot/grub/grub.cfg'
## For the memes
alias fetch='echo && fastfetch'
alias hello="notify-send 'Oh, hi! Nice to see you!' 'Remember to take regular breaks and drink water!'"
alias btw="notify-send 'i use arch btw'"
alias pls='sudo $(fc -ln -1)'
alias cmatrix='cmatrix -a'
## Scripts
alias newmonth='sh ~/Scripts/newmonth.sh'
## Functions
# Archive extraction
function ex {
if [ -z "$1" ]; then
# display usage if no parameters given
echo -e "Usage: ex [path/file_name].[zip/rar/bz2/gz/tar/tbz2/tgz/Z/7z/xz/ex/tar.bz2/tar.gz/tar.xz]"
echo -e " 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
}
## Package management
alias s='yay -S'
alias sy='yay -Sy'
alias syu='yay -Syu'
alias rn='yay -Rn'
alias rns='yay -Rns'
alias ss='yay -Ss'
alias pw='yay -Pw'
alias pww='yay -Pww'
alias Q='pacman -Q'
alias ql='pacman -Q | wc -l'
alias si='pacman -Si'
alias qdtq='yay -Rns $(pacman -Qdtq)'
alias ls=‘/usr/bin/ls --time-style=+“%Y-%m-%d@%H:%M” --color=auto’
alias la=“ls -althr --group-directories-first”
alias ll=“ls -lh --group-directories-first”
alias jboot=‘journalctl -b -p 0..3 --no-pager’
alias j=‘journalctl --no-pager’
alias jt=“journalctl --since=yesterday”
alias jf=“journalctl -f”
alias jb=“journalctl -b”
alias jgrep="journalctl | grep "
alias jgrepb=="journalctl -b | grep "
alias udevreload=“sudo udevadm control --reload-rules && sudo udevadm trigger”
alias rsync_copy=“rsync -aAhHxX --info=progress2”
alias rsync_mac="rsync -a --info=progress2 --rsync-path=/opt/homebrew/bin/rsync "
alias root=“sudo -i zsh”
alias zeroroot=“run0 --background=‘’ zsh”
alias p_u=“paru -Syu --nodevel”
alias p_i=“paru -U”
alias y_u=“yay -Syu”
alias y_i=“yay -U”
alias pacgrep=“pacman -Q | grep -Ei”
alias pacinfo=“pacman -Qi”
alias pacremove=“sudo pacman -Rns”
alias pacorphan="pacman -Qdtq
alias cp="cp -i"
alias mv="mv -i"
alias rm='rm -i'
alias rmy='/bin/rm'
alias df='df -h'
alias free='free -m'
alias ls='ls -la --color=auto'
alias yy='yay -Pw && eos-update --aur'
alias yt-dmus='yt-dlp -x --audio-format opus "$@"'
alias erm='eos-rankmirrors --ignore=freedif,hacktegic,funami,leitecastro'
alias upd='eos-update --pacdiff --nvidia --cache-limit=2 --other-updates --faillock-check --keep-system-running --fast
alias ranke='eos-rankmirrors -nb'
alias welcome='eos-welcome -1'
alias news='xdg-open https://archlinux.org/news/ 2>/dev/null'
alias rehash='hash -r'
To my knowledge --preserve-root is the default for rm. I am not that sure -f or * will make any difference. Anyhow, to be “absolutely sure”, I’ll have to sacrifice a system in VM to verify that.
Wow. I feel totally lame compared to some of these aliases!! Mine is as follows:
Mind you, this is on Kubuntu 26.04 - which I am seriously considering switching back to either Endeavor or Cachy. I had 2 kernel panics right after updating after install!
alias upgrade=‘sudo apt update && sudo apt full-upgrade && sudo snap refresh’
alias cleanup=‘sudo apt autoremove’
Mine is a mix of random madness, a few taken out that were specific to me, but some might find these useful ; (and yes, f*** was actually the other word, but had to star it out to post )
bash_aliases: Created 2024-08-10
Updated : 2025-11-08 (Enhanced with safety features)
Incept : 2026-04-08 17:35:58.000000000 +0100
Original Incept : Saturday 27th July 2024
══════════════════════════════════════════════════════════
SAFETY ALIASES
══════════════════════════════════════════════════════════
Stops you doing stupid stuff
alias cp=‘cp -iv’
alias mv=‘mv -iv’
alias rm=‘trash-put’ # Replaces rm with trash
alias rmtrash=‘trash-empty’ # Clear trash
alias restoretrash=‘trash-restore’ # Restore from trash
══════════════════════════════════════════════════════════
SYSTEM MAINTENANCE
══════════════════════════════════════════════════════════
More robust cleanup alias
alias cleanup=‘yay -Qdtq | yay -Rns - && yay -Sc’
Add a quick way to list large files/directories
alias ducks=‘du -cks * | sort -rn | head -11’
══════════════════════════════════════════════════════════
NAVIGATION SHORTCUTS
══════════════════════════════════════════════════════════
alias ..=‘cd ..’
alias …=‘cd ../..’
══════════════════════════════════════════════════════════
NETWORK UTILITIES
══════════════════════════════════════════════════════════
alias myip=‘curl ifconfig.me’
alias ports=‘sudo netstat -tulanp’
══════════════════════════════════════════════════════════
SYSTEM INFORMATION
══════════════════════════════════════════════════════════
alias meminfo=‘free -h’
alias cpuinfo=‘lscpu | grep “Model name”’
══════════════════════════════════════════════════════════
GENERAL SHORTCUTS
══════════════════════════════════════════════════════════
alias dim=‘xrandr --output DisplayPort-0 --gamma 0.850:0.850:0.850’
alias bright=‘xrandr --output DisplayPort-0 --gamma 1:1:1’
alias cd..=‘cd ..’
alias cls=‘clear’
alias doc2odt=‘libreoffice --headless --convert-to odt *.doc’
alias docx2odt=‘libreoffice --headless --convert-to odt *.docx’
alias est=‘eos-shifttime’
alias ff=‘fastfetch’
alias f***=‘sudo !!’
alias incept=‘stat -c %w /’
alias isochk=‘sha512sum -c $(ls -1 .iso.sha | fzf)’
alias jb=‘vim ~/.bashrc’
alias jba=‘vim ~/.bash_aliases’
alias ls=‘eza’
alias vpon=‘protonvpn connect’
alias vpoff=‘protonvpn disconnect’
alias sb=‘source ~/.bashrc’
alias sdr=‘systemctl daemon-reload’
alias sde=‘sudo systemctl daemon-reexec’
alias shutdown=‘systemctl poweroff’
alias upd=‘sudo pacman -Syyu’
alias sps=‘sudo pacman -Syu’
alias spu=‘sudo pacman -Rs’
alias vi=‘vim’
alias yt-mp3=“yt-dlp -f ‘ba’ -x --audio-format mp3”
alias yt=‘yt-dlp’
alias yy=‘yay -R’
══════════════════════════════════════════════════════════
END OF FILE
══════════════════════════════════════════════════════════
Genuinely curious on what you’re raising an eyebrow on @r0ckhopper - as far as I can tell, I haven’t got any aliases that get people to nuke their systems