2022-04-16 19:54:07 +00:00
|
|
|
# vim: ft=sh
|
|
|
|
|
|
|
|
# Vim stuff
|
2023-01-09 03:52:24 +00:00
|
|
|
alias vim="neovide"
|
2022-04-16 19:54:07 +00:00
|
|
|
alias :q="exit"
|
|
|
|
alias :wq="exit"
|
|
|
|
alias q="exit"
|
|
|
|
alias i="vim -c 'startinsert'"
|
|
|
|
|
|
|
|
# shortcuts
|
|
|
|
alias c="clear"
|
|
|
|
alias t="date +%T"
|
2022-05-27 21:07:55 +00:00
|
|
|
alias ll="ls -alh"
|
2022-04-16 19:54:07 +00:00
|
|
|
alias fuck='sudo "$BASH" -c "$(history -p !!)"'
|
|
|
|
|
2022-10-31 20:57:48 +00:00
|
|
|
# improve default options for CLI tools
|
2023-01-07 12:14:28 +00:00
|
|
|
alias diff="diff --side-by-side --left-column -W \$COLUMNS"
|
2022-10-31 20:57:48 +00:00
|
|
|
|
2022-04-16 19:54:07 +00:00
|
|
|
# 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
|
2022-05-27 21:07:55 +00:00
|
|
|
alias ifconfig="ip addr"
|
2022-04-16 19:54:07 +00:00
|
|
|
|
|
|
|
# SSH hop script
|
2022-05-27 21:07:55 +00:00
|
|
|
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"
|
2022-04-16 19:54:07 +00:00
|
|
|
|
|
|
|
# Prefer a Vim in a new terminal over gVim
|
|
|
|
alias gvim="/usr/bin/urxvt -e /bin/bash -c vim -i"
|
|
|
|
|
|
|
|
# Startup scripts
|
2022-05-27 21:07:55 +00:00
|
|
|
alias startsway="${HOME}/scripts/sway/startsway.sh"
|
|
|
|
alias starti3="${HOME}/scripts/i3/starti3.sh"
|
2022-04-16 19:54:07 +00:00
|
|
|
|
|
|
|
# Web shortcuts
|
2022-09-12 15:32:24 +00:00
|
|
|
alias papillon="flatpak run com.github.Eloston.UngoogledChromium --app='https://papillon.john.me.tz/hud.php?refresh=3600&theme=dark'"
|
2022-04-16 19:54:07 +00:00
|
|
|
|
|
|
|
# Force python3
|
|
|
|
alias pip="pip3"
|
|
|
|
alias python="python3"
|
|
|
|
|
|
|
|
# Backlight control
|
2022-05-27 21:07:55 +00:00
|
|
|
alias blc="${HOME}/scripts/thinkpad/blc.pl --notify"
|
2022-09-05 18:55:36 +00:00
|
|
|
|
|
|
|
# Flatpaks
|
|
|
|
alias mpv="flatpak run io.mpv.Mpv"
|
2022-10-17 15:44:00 +00:00
|
|
|
|
|
|
|
# Detect if I'm in a toolbox
|
2022-12-13 03:44:24 +00:00
|
|
|
alias isdistrobox='[ -f "/run/.toolboxenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv'
|
2022-11-04 15:14:37 +00:00
|
|
|
|
2022-12-28 15:38:43 +00:00
|
|
|
# Flag that the directory was just changed (used with prompt)
|
|
|
|
alias cd='export DIRCHANGED="1"; cd'
|
|
|
|
|
2023-02-24 01:24:59 +00:00
|
|
|
if [ "$(isdistrobox)" ]; then
|
|
|
|
source "$HOME/.dotfiles/bash/bash_aliases.distrobox"
|
2022-12-12 19:29:13 +00:00
|
|
|
else
|
2023-02-24 01:24:59 +00:00
|
|
|
source "$HOME/.dotfiles/bash/bash_aliases.host"
|
2022-12-12 19:29:13 +00:00
|
|
|
fi
|