89 lines
3 KiB
Bash
89 lines
3 KiB
Bash
#!/bin/sh
|
|
|
|
alias :q='exit'
|
|
alias :wq='exit'
|
|
|
|
alias aliases='$EDITOR ~/.config/aliasrc && . ~/.config/aliasrc'
|
|
alias aliases.local='$EDITOR ~/.config/aliasrc.local && . ~/.config/aliasrc'
|
|
# shellcheck disable=2154
|
|
alias arch-deps2deps='set -a; source PKGBUILD; set +a; paru -S --asdeps --noconfirm $depends && paru -Ui --rebuild'
|
|
alias asciinema-clear-log='if [ -f "$ASCIINEMA_LOG_FILE" ]; then \rm -v "$ASCIINEMA_LOG_FILE"; else echo "No log file found"; fi'
|
|
|
|
alias bspwm-default='echo "default" > /tmp/bspwm_mode; bspc wm -r'
|
|
alias bspwm-present='echo "presenter" > /tmp/bspwm_mode; bspc wm -r'
|
|
alias bspwm-single='echo "single" > /tmp/bspwm_mode; bspc wm -r'
|
|
|
|
alias clip='xclip -selection clipboard'
|
|
alias cp='cp -iv'
|
|
|
|
alias dcu='docker compose up -d --force-recreate'
|
|
alias dclf='docker compose logs -tf'
|
|
alias dcul='dcu && dclf'
|
|
alias dcp='docker compose pull'
|
|
alias df='df -h'
|
|
alias dns-flush='sudo systemctl restart systemd-resolved.service && sudo systemd-resolve --flush-caches && sudo resolvectl flush-caches'
|
|
alias doas='doas -- '
|
|
alias doasu='\doas -u '
|
|
alias docker-caddy-reload='docker compose exec app sh -c "caddy validate --config /etc/caddy/Caddyfile && caddy reload --config /etc/caddy/Caddyfile"'
|
|
alias du='du -h'
|
|
|
|
alias free='free -h'
|
|
|
|
alias git-apply-clip='wl-paste | base64 -d | git apply -'
|
|
alias grep='grep --color=auto'
|
|
alias grep-highlight='grep -e "^" -e'
|
|
|
|
alias hist-grep='history 0 | grep '
|
|
alias http-server='python3 -m http.server'
|
|
|
|
alias ip='ip -c'
|
|
|
|
alias j='jump'
|
|
|
|
alias keepass-unlock='(pkill keepassxc; pass keepass | head -n 1 | keepassxc --pw-stdin ~/sync/passwords.kdbx) & disown'
|
|
|
|
alias less='less -FS -x4'
|
|
alias ls='ls -lFh --color=auto'
|
|
alias lsblk='lsblk -o +LABEL,FSTYPE'
|
|
|
|
alias make='make -j5'
|
|
alias mkdir='mkdir -pv'
|
|
alias mv='mv -iv'
|
|
|
|
alias pacman-autoremove='sudo pacman -Rns $(pacman -Qtdq)'
|
|
alias pacman-autoremove-opts='sudo pacman -Rns $(pacman -Qttdq)'
|
|
alias ps-grep='ps aux | grep -v grep | grep'
|
|
|
|
alias qutebrowser-kiosk='qutebrowser -B $XDG_DATA_HOME/qutebrowser-kiosk -C $XDG_CONFIG_HOME/qutebrowser/config-kiosk.py'
|
|
|
|
alias rm='rm -I --one-file-system -v'
|
|
|
|
alias sl='ls'
|
|
alias sudo='sudo '
|
|
|
|
alias taketemp='take $(mktemp -d)'
|
|
alias tokei='tokei --hidden'
|
|
|
|
alias watch='watch -c'
|
|
alias wget='wget -c'
|
|
|
|
alias xdebug='XDEBUG_CONFIG="remote_host=127.0.0.1 remote_port=9003"'
|
|
|
|
### conditionals
|
|
|
|
test -x "$(command -v atuin)" && alias hist-grep='atuin search'
|
|
|
|
test -x "$(command -v bat)" && alias cat='bat -pp'
|
|
|
|
test -x "$(command -v eza)" && alias ls='eza -lhF --git --icons --color=always --color-scale --color-scale-mode=fixed --time-style=long-iso --group-directories-first --no-quotes'
|
|
|
|
test -x "$(command -v moar)" && alias less='moar'
|
|
|
|
test -x "$(command -v nvim)" && alias vim='nvim'
|
|
|
|
test -x "$(command -v rmtrash)" && alias rm='rmtrash -I --one-file-system'
|
|
test -x "$(command -v rmdirtrash)" && alias rmdir='rmdirtrash'
|
|
|
|
test ! -x "$(command -v yadm)" && alias yadm='git --git-dir="$HOME/.local/share/yadm/repo.git"'
|
|
|
|
test -x "$HOME/.config/aliasrc.local" && . "$HOME/.config/aliasrc.local"
|