.dotfiles/bash/bash_aliases

44 lines
1.2 KiB
Bash

# vim: ft=sh
# Vim stuff
alias vim="flatpak run io.neovim.nvim 2>/dev/null"
alias :q="exit"
alias :wq="exit"
alias q="exit"
alias i="vim -c 'startinsert'"
# shortcuts
alias c="clear"
alias t="date +%T"
alias ll="ls -alh"
alias fuck='sudo "$BASH" -c "$(history -p !!)"'
# OS functions (TODO: should be broken out and pulled in based on OS)
alias apt-all="sudo apt-get update; sudo apt-get full-upgrade -y; sudo apt-get autoremove -y; sudo apt-get clean -y;"
alias rpm-all="rpm-ostree upgrade"
alias pip-upgrade="pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U"
# Legacy mappings
alias ifconfig="ip addr"
# SSH hop script
alias pgen="ssh -A -t -i ~/.ssh/no_pass 10.10.0.1 ~/bin/pgen"
alias spgen="ssh -A -t -i ~/.ssh/no_pass 10.10.0.1 ~/bin/spgen"
# Prefer a Vim in a new terminal over gVim
alias gvim="/usr/bin/urxvt -e /bin/bash -c vim -i"
# Startup scripts
alias startsway="${HOME}/scripts/sway/startsway.sh"
alias starti3="${HOME}/scripts/i3/starti3.sh"
# Web shortcuts
alias papillon="/usr/bin/chromium --app='https://papillon.john.me.tz/hud.php?refresh=3600&theme=dark'"
# Force python3
alias pip="pip3"
alias python="python3"
# Backlight control
alias blc="${HOME}/scripts/thinkpad/blc.pl --notify"