# Git if command -q git alias g "git" alias gc "git clone" alias gd "git diff --ignore-space-at-eol" alias gds "git diff --ignore-space-at-eol --compact-summary" alias gl "git log --oneline" alias gp "git pull" alias gs "git status" alias home "git --git-dir=$HOME/.home/ --work-tree=$HOME" alias homeinit "git clone --bare https://git.urbach.dev/sys/home $HOME/.home && home checkout" alias h "home" alias hs "home status" alias hd "home diff --ignore-space-at-eol" alias hds "home diff --ignore-space-at-eol --compact-summary" alias hp "home pull" end # Go if command -q go alias gb "go build -v" alias godeps "go list -f '{{ join .Deps \"\n\"}}' ." alias gt "go test -v" alias gts "gotestsum" end # Hyperfine if command -q hyperfine alias bench "hyperfine --shell=none" end # Kernel if command -q dmesg alias kerr "sudo dmesg --level=emerg,alert,crit,err" alias klog "sudo dmesg" end # List if command -q ls alias l "ls" alias ll "ls -l" alias l2 "ls -T -L2" alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time" alias lp "ls -l --no-filesize --no-time" end # Lsof if command -q lsof alias tcp "lsof -PniTCP" alias udp "lsof -PniUDP" end # MPV if command -q mpv alias music "mpv music --shuffle --no-video" end # Neovim if command -q nvim alias e nvim end # Pacman if command -q apk alias p "apk" alias pi "sudo apk add" alias pr "sudo apk del" alias pu "sudo apk update && sudo apk upgrade" alias pl "apk info" alias po "apk info --who-owns" else if command -q pacman alias p "pacman" alias pi "sudo pacman -S" alias pr "sudo pacman -Rs" alias pu "sudo pacman -Syu" alias pl "pacman -Qq" alias pe "pacman -Qe" alias pc "sudo pacman -Sc" alias paur "pacman -Qm" alias pfiles "pacman -Ql" alias porphan "pacman -Qtdq" alias po "pacman -Qo" end # Sudo if command -q doas alias sudo "doas" end # Systemctl if command -q service alias services "service -l" else if command -q systemctl alias start "sudo systemctl start" alias stop "sudo systemctl stop" alias enable "sudo systemctl enable" alias disable "sudo systemctl disable" alias restart "sudo systemctl restart" alias running "systemctl list-units --type=service --state=running" alias disabled "systemctl list-unit-files --type=service --state=disabled" alias enabled "systemctl list-unit-files --type=service --state=enabled" alias timers "systemctl list-timers" alias bios "systemctl reboot --firmware-setup" end # Tmux if command -q tmux alias ta "tmux attach" alias td "tmux detach" alias tl "tmux ls" alias tk "tmux kill-server" end # ... alias align "column -t -o ' '" alias cfg "config" alias cls "clear" alias debug "blinkenlights" alias disasm "llvm-objdump --disassembler-color=on --x86-asm-syntax=intel -d" alias ff "fastfetch" alias fn "rg --files | rg" alias hex "hexdump -C" alias log "journalctl" alias utc "date -u +'%Y-%m-%dT%H:%M:%SZ'" alias dl "yt-dlp -x -f bestaudio" alias mirror "wget --mirror --page-requisites --adjust-extension --no-parent --convert-links" alias perfstats "perf stat -etask-clock,context-switches,cpu-migrations,page-faults,cycles,branches,branch-misses,instructions,uops_issued.any,uops_executed.thread,idq_uops_not_delivered.core"