install.fairie/home/dot_config/shell/aliases.sh.tmpl
Brian Zalewski 72dc4e03d9 Update 252 files
- /home/private_dot_config/Google Assistant/config.json.tmpl
- /home/private_dot_config/Google Assistant/encrypted_client-secret.json
- /home/private_dot_config/Google Assistant/encrypted_tokens.json
- /home/private_dot_config/Kvantum/kvantum.config
- /home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl
- /home/private_dot_config/alacritty/alacritty.yml
- /home/private_dot_config/asdf/asdfrc.tmpl
- /home/private_dot_config/asdf/default-cargo-pkgs
- /home/private_dot_config/asdf/default-golang-pkgs
- /home/private_dot_config/asdf/default-npm-packages
- /home/private_dot_config/asdf/default-python-pkgs
- /home/private_dot_config/asdf/default-ruby-pkgs
- /home/private_dot_config/bashtop/bashtop.cfg
- /home/private_dot_config/bat/config
- /home/private_dot_config/brew/Brewfile.tmpl
- /home/private_dot_config/brew/whalebrew
- /home/private_dot_config/chromium-flags.conf
- /home/private_dot_config/crontab/config
- /home/private_dot_config/dconf/settings/org.gnome.desktop.app-folders
- /home/private_dot_config/dconf/settings/org.gnome.desktop.background
- /home/private_dot_config/dconf/settings/org.gnome.desktop.calendar
- /home/private_dot_config/dconf/settings/org.gnome.desktop.interface
- /home/private_dot_config/dconf/settings/org.gnome.desktop.privacy
- /home/private_dot_config/dconf/settings/org.gnome.desktop.screensaver
- /home/private_dot_config/dconf/settings/org.gnome.desktop.session
- /home/private_dot_config/dconf/settings/org.gnome.desktop.sound
- /home/private_dot_config/dconf/settings/org.gnome.desktop.wm.preferences
- /home/private_dot_config/dconf/settings/org.gnome.nautilus
- /home/private_dot_config/dconf/settings/org.gnome.settings-daemon.plugins.power
- /home/private_dot_config/dconf/settings/org.gnome.shell
- /home/private_dot_config/dconf/settings/org.gnome.terminal
- /home/private_dot_config/dconf/settings/org.gtk.settings.debug
- /home/private_dot_config/dconf/settings/org.gtk.settings.file-chooser
- /home/private_dot_config/dconf/settings/system.proxy
- /home/private_dot_config/direnv/direnv.toml
- /home/private_dot_config/docker/cli-plugins/executable_docker-clip
- /home/private_dot_config/docker/daemon.json
- /home/private_dot_config/fd/ignore
- /home/private_dot_config/firejail/bitwarden.local
- /home/private_dot_config/firejail/chromium.local
- /home/private_dot_config/firejail/code.local
- /home/private_dot_config/firejail/gcloud.local
- /home/private_dot_config/firejail/google-chrome-stable.local
- /home/private_dot_config/firejail/slack.local
- /home/private_dot_config/firejail/thunderbird.local
- /home/private_dot_config/fontconfig/fonts.conf
- /home/private_dot_config/ghorg/conf.yaml.tmpl
- /home/private_dot_config/git/attributes
- /home/private_dot_config/git/commit-template
- /home/private_dot_config/git/config.tmpl
- /home/private_dot_config/git/ignore
- /home/private_dot_config/git/template/branches/remove_dot_gitkeep
- /home/private_dot_config/git/template/description
- /home/private_dot_config/git/template/hooks/symlink_commit-msg.tmpl
- /home/private_dot_config/git/template/hooks/symlink_post-checkout.tmpl
- /home/private_dot_config/git/template/hooks/symlink_post-commit.tmpl
- /home/private_dot_config/git/template/hooks/symlink_post-merge.tmpl
- /home/private_dot_config/git/template/hooks/symlink_post-rewrite.tmpl
- /home/private_dot_config/git/template/hooks/symlink_pre-commit.tmpl
- /home/private_dot_config/git/template/hooks/symlink_pre-push.tmpl
- /home/private_dot_config/git/template/hooks/symlink_prepare-commit-msg.tmpl
- /home/private_dot_config/git/template/info/exclude
- /home/private_dot_config/gtk-1.0/.gitkeep
- /home/private_dot_config/gtk-2.0/gtkrc
- /home/private_dot_config/gtk-3.0/settings.ini
- /home/private_dot_config/gtkrc
- /home/private_dot_config/heroku/deploy.yml.tmpl
- /home/private_dot_config/himalaya/config.toml
- /home/private_dot_config/k9s/plugin.yml
- /home/private_dot_config/kcminputrc
- /home/private_dot_config/kdeglobals
- /home/private_dot_config/kitty/Betelgeuse-dark.conf
- /home/private_dot_config/kitty/Betelgeuse-light.conf
- /home/private_dot_config/kitty/kitty.conf
- /home/private_dot_config/konsolerc
- /home/private_dot_config/ksplashrc
- /home/private_dot_config/ktimezonedrc
- /home/private_dot_config/kwinrc
- /home/private_dot_config/libvirt/libvirtd.conf
- /home/private_dot_config/mimeapps.list
- /home/private_dot_config/ngrok/ngrok.yml.tmpl
- /home/private_dot_config/npm/config/npm-init.js
- /home/private_dot_config/npm/npmrc.tmpl
- /home/private_dot_config/nvim-custom/init.lua
- /home/private_dot_config/nvim-custom/run_onchanges_after_symlink-custom.tmpl
- /home/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json
- /home/private_dot_config/oh-my-posh/Betelgeuse.omp.json
- /home/private_dot_config/pg/.gitkeep
- /home/private_dot_config/pgcli/config
- /home/private_dot_config/plasma-localerc
- /home/private_dot_config/plasma/plasmoids.yml
- /home/private_dot_config/plasmarc
- /home/private_dot_config/powershell/profile.ps1
- /home/private_dot_config/private_Code/User/extensions.json
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json
- /home/private_dot_config/private_Code/User/keybindings.json
- /home/private_dot_config/private_Code/User/settings.json
- /home/private_dot_config/putty/.gitkeep
- /home/private_dot_config/rclone/merge_rclone.conf
- /home/private_dot_config/readline/inputrc
- /home/private_dot_config/ripgrep/config
- /home/private_dot_config/rofi-user/config.rasi.tmpl
- /home/private_dot_config/shell/aliases.sh.tmpl
- /home/private_dot_config/shell/exports.sh.tmpl
- /home/private_dot_config/shell/functions.sh
- /home/private_dot_config/shell/motd.sh
- /home/private_dot_config/shell/private_private.sh
- /home/private_dot_config/shell/profile.sh
- /home/private_dot_config/slack-term/config.tmpl
- /home/private_dot_config/tabby/encrypted-fallback_config.yaml
- /home/private_dot_config/tabby/encrypted_config.yaml
- /home/private_dot_config/tabby/plugins/package.json
- /home/private_dot_config/tabby/plugins/run_onchange_after_install-tabby-plugins.tmpl
- /home/private_dot_config/terminator/config
- /home/private_dot_config/tmux/remove_dot_gitkeep
- /home/private_dot_config/vim/vimrc
- /home/private_dot_config/wget/wgetrc
- /home/private_dot_config/xfce4/terminal/terminalrc
- /home/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
- /home/private_dot_config/xsettingsd/xsettingsd.conf
- /home/private_dot_config/youtube-dl/config
- /home/private_dot_config/zap/v2/config.ini.tmpl
- /home/dot_config/Google Assistant/config.json.tmpl
- /home/dot_config/Google Assistant/encrypted_client-secret.json
- /home/dot_config/Google Assistant/encrypted_tokens.json
- /home/dot_config/Kvantum/kvantum.config
- /home/dot_config/VirtualBox/VirtualBox.xml.tmpl
- /home/dot_config/alacritty/alacritty.yml
- /home/dot_config/asdf/default-python-pkgs
- /home/dot_config/asdf/default-golang-pkgs
- /home/dot_config/asdf/asdfrc.tmpl
- /home/dot_config/asdf/default-ruby-pkgs
- /home/dot_config/asdf/default-cargo-pkgs
- /home/dot_config/asdf/default-npm-packages
- /home/dot_config/bashtop/bashtop.cfg
- /home/dot_config/bat/config
- /home/dot_config/brew/whalebrew
- /home/dot_config/brew/Brewfile.tmpl
- /home/dot_config/crontab/config
- /home/dot_config/dconf/settings/org.gnome.desktop.sound
- /home/dot_config/dconf/settings/org.gnome.desktop.screensaver
- /home/dot_config/dconf/settings/org.gnome.desktop.session
- /home/dot_config/dconf/settings/org.gnome.desktop.wm.preferences
- /home/dot_config/dconf/settings/org.gnome.desktop.privacy
- /home/dot_config/dconf/settings/org.gnome.shell
- /home/dot_config/dconf/settings/org.gnome.terminal
- /home/dot_config/dconf/settings/org.gtk.settings.debug
- /home/dot_config/dconf/settings/org.gnome.nautilus
- /home/dot_config/dconf/settings/org.gnome.desktop.app-folders
- /home/dot_config/dconf/settings/org.gnome.settings-daemon.plugins.power
- /home/dot_config/dconf/settings/org.gnome.desktop.background
- /home/dot_config/dconf/settings/org.gnome.desktop.interface
- /home/dot_config/dconf/settings/org.gtk.settings.file-chooser
- /home/dot_config/dconf/settings/system.proxy
- /home/dot_config/dconf/settings/org.gnome.desktop.calendar
- /home/dot_config/direnv/direnv.toml
- /home/dot_config/docker/cli-plugins/executable_docker-clip
- /home/dot_config/docker/daemon.json
- /home/dot_config/fd/ignore
- /home/dot_config/firejail/bitwarden.local
- /home/dot_config/firejail/thunderbird.local
- /home/dot_config/firejail/chromium.local
- /home/dot_config/firejail/code.local
- /home/dot_config/firejail/gcloud.local
- /home/dot_config/firejail/slack.local
- /home/dot_config/firejail/google-chrome-stable.local
- /home/dot_config/fontconfig/fonts.conf
- /home/dot_config/ghorg/conf.yaml.tmpl
- /home/dot_config/git/template/branches/remove_dot_gitkeep
- /home/dot_config/git/template/hooks/symlink_prepare-commit-msg.tmpl
- /home/dot_config/git/template/hooks/symlink_post-merge.tmpl
- /home/dot_config/git/template/hooks/symlink_post-checkout.tmpl
- /home/dot_config/git/template/hooks/symlink_post-commit.tmpl
- /home/dot_config/git/template/hooks/symlink_commit-msg.tmpl
- /home/dot_config/git/template/hooks/symlink_post-rewrite.tmpl
- /home/dot_config/git/template/hooks/symlink_pre-commit.tmpl
- /home/dot_config/git/template/hooks/symlink_pre-push.tmpl
- /home/dot_config/git/template/info/exclude
- /home/dot_config/git/template/description
- /home/dot_config/git/config.tmpl
- /home/dot_config/git/ignore
- /home/dot_config/git/attributes
- /home/dot_config/git/commit-template
- /home/dot_config/gtk-1.0/.gitkeep
- /home/dot_config/gtk-2.0/gtkrc
- /home/dot_config/gtk-3.0/settings.ini
- /home/dot_config/heroku/deploy.yml.tmpl
- /home/dot_config/himalaya/config.toml
- /home/dot_config/k9s/plugin.yml
- /home/dot_config/kitty/kitty.conf
- /home/dot_config/kitty/Betelgeuse-dark.conf
- /home/dot_config/kitty/Betelgeuse-light.conf
- /home/dot_config/libvirt/libvirtd.conf
- /home/dot_config/ngrok/ngrok.yml.tmpl
- /home/dot_config/npm/config/npm-init.js
- /home/dot_config/npm/npmrc.tmpl
- /home/dot_config/nvim-custom/init.lua
- /home/dot_config/nvim-custom/run_onchanges_after_symlink-custom.tmpl
- /home/dot_config/oh-my-posh/Betelgeuse-minimal.omp.json
- /home/dot_config/oh-my-posh/Betelgeuse.omp.json
- /home/dot_config/pg/.gitkeep
- /home/dot_config/pgcli/config
- /home/dot_config/plasma/plasmoids.yml
- /home/dot_config/powershell/profile.ps1
- /home/dot_config/putty/.gitkeep
- /home/dot_config/rclone/merge_rclone.conf
- /home/dot_config/readline/inputrc
- /home/dot_config/ripgrep/config
- /home/dot_config/rofi-user/config.rasi.tmpl
- /home/dot_config/shell/aliases.sh.tmpl
- /home/dot_config/shell/exports.sh.tmpl
- /home/dot_config/shell/private_private.sh
- /home/dot_config/shell/functions.sh
- /home/dot_config/shell/profile.sh
- /home/dot_config/shell/motd.sh
- /home/dot_config/slack-term/config.tmpl
- /home/dot_config/tabby/plugins/package.json
- /home/dot_config/tabby/plugins/run_onchange_after_install-tabby-plugins.tmpl
- /home/dot_config/tabby/encrypted-fallback_config.yaml
- /home/dot_config/tabby/encrypted_config.yaml
- /home/dot_config/terminator/config
- /home/dot_config/tmux/remove_dot_gitkeep
- /home/dot_config/vim/vimrc
- /home/dot_config/wget/wgetrc
- /home/dot_config/xfce4/terminal/terminalrc
- /home/dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
- /home/dot_config/xsettingsd/xsettingsd.conf
- /home/dot_config/youtube-dl/config
- /home/dot_config/zap/v2/config.ini.tmpl
- /home/dot_config/ktimezonedrc
- /home/dot_config/plasma-localerc
- /home/dot_config/kcminputrc
- /home/dot_config/kwinrc
- /home/dot_config/mimeapps.list
- /home/dot_config/ksplashrc
- /home/dot_config/gtkrc
- /home/dot_config/kdeglobals
- /home/dot_config/plasmarc
- /home/dot_config/konsolerc
- /home/dot_config/chromium-flags.conf
- /home/dot_config/Code/User/extensions.json
- /home/dot_config/Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json
- /home/dot_config/Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json
- /home/dot_config/Code/User/extensions/theme-betelgeuse-vscode/package.json
- /home/dot_config/Code/User/extensions/theme-betelgeuse-vscode/README.md
- /home/dot_config/Code/User/extensions/theme-betelgeuse-vscode/icon.svg
- /home/dot_config/Code/User/settings.json
- /home/dot_config/Code/User/keybindings.json
2023-01-25 00:20:21 +00:00

236 lines
6.2 KiB
Bash

#!/usr/bin/env sh
{{ if eq .chezmoi.os "darwin" }}
### macOS Polyfills
# Note: May cause conflicts
if command -v brew > /dev/null; then
PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH"
PATH="$(brew --prefix)/opt/gnu-indent/libexec/gnubin:$PATH"
PATH="$(brew --prefix)/opt/gnu-sed/libexec/gnubin:$PATH"
fi
{{- end }}
# Basic command aliases for verbosity / simplicity
alias cp='cp -v'
alias ln='ln -sriv'
alias mv='mv -vi'
alias rm='rm -vi'
### Colorize
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias diff='diff --color=auto'
alias ip='ip --color=auto'
alias pacman='pacman --color=auto'
### TOP - order based on preference of "top" application (last item will always be chosen if installed, e.g. glances)
if command -v glances > /dev/null; then
alias top='glances'
elif command -v htop > /dev/null; then
alias top='bashtop'
fi
### bat
if command -v bat > /dev/null; then
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
alias bathelp='bat --plain --language=help'
alias cat='bat -pp'
alias less='bat --paging=always'
help() {
"$@" --help 2>&1 | bathelp
}
fi
### curlie
if command -v curlie > /dev/null; then
alias curl='curlie'
fi
### exa
if command -v exa > /dev/null; then
alias ls='exa --long --all --color auto --icons --sort=type'
alias tree='exa --tree'
alias la='ls -la'
alias lt='ls --tree --level=2'
else
# Show full output when using ls
alias ls='ls -AlhF --color=auto'
fi
### gping
# Replacement for ping that includes graph
if command -v gping > /dev/null; then
alias ping='gping'
fi
### VIM
if command -v vim > /dev/null; then
alias vi='vim'
alias v='vim'
fi
### mitmproxy / mitmweb
if command -v mitmproxy > /dev/null; then
alias mitmproxy="mitmproxy --set confdir=$XDG_CONFIG_HOME/mitmproxy"
fi
if command -v mitmweb > /dev/null; then
alias mitmweb="mitmweb --set confdir=$XDG_CONFIG_HOME/mitmproxy"
fi
### ripgrep
if command -v rg &> /dev/null; then
alias rgrep='rg --color=auto'
fi
### xclip
alias xclip='xclip -selection c'
### VSCodium
if command -v codium > /dev/null; then
if command -v code > /dev/null; then
alias vscode="$(which code)"
fi
alias code='codium'
fi
# Fix for auto expansion (source: https://wiki.archlinux.org/title/Sudo#Passing_aliases)
alias sudo='sudo '
# Reload current shell
alias reload="exec ${SHELL} -l"
# Create an Authelia password hash
alias authelia-password='docker run authelia/authelia:latest authelia hash-password'
# Shows IP addresses that are currently banned by fail2ban
alias banned='sudo zgrep "Ban" /var/log/fail2ban.log*'
alias connections='nm-connection-editor'
# Command-line DNS utility
if ! command -v dog > /dev/null; then
alias dog="docker run -it --rm dog"
fi
# Download a file
alias download='curl --continue-at - --location --progress-bar --remote-name --remote-time'
# Download a website
alias download-site='wget --mirror -p --convert-links -P'
# Flush DNS
alias flush-dns='sudo systemd-resolve --flush-caches && sudo systemd-resolve --statistics'
# FontBook for macOS
alias fontbook="open -b com.apple.FontBook"
# Get the possible GRUB resolutions
alias grub-resolutions='sudo hwinfo --framebuffer'
# Execute git command with sudo priviledges while retaining .gitconfig
alias gsudo='sudo git -c "include.path="${XDG_CONFIG_DIR:-$HOME/.config}/git/config\" -c \"include.path=$HOME/.gitconfig\"'
# Create hashed password for Ansible user creation
alias hash-password='mkpasswd --method=sha-512'
# Show IP address
alias ip-address='curl http://ipecho.net/plain; echo'
# Shows local IP addresses
alias local-ip-address="ifconfig | grep -Eo 'inet (addr:|adr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
# Create parent directories automatically
alias mkdir='mkdir -pv'
# Make mount command output readable
alias mount='mount | column -t'
# Link pip to pip3
if ! command -v pip > /dev/null; then
alias pip='pip3'
fi
# Masked sudo password entry
if command -v gum > /dev/null; then
alias please="gum input --password | sudo -nS"
fi
# Convert macOS plist to XML (for source control)
alias plist-xml='plutil -convert xml1'
# Recoverpy
alias recoverpy='python3 -m recoverpy'
# Show open ports
alias ports='sudo netstat -tulanp'
# Shuts down the computer, skipping the shutdown scripts
alias poweroff='sudo /sbin/poweroff'
# Open the Rclone web GUI
alias rclone-gui='rclone rcd --rc-web-gui --rc-user=admin --rc-pass=pass --rc-serve'
# Reboot the computer
alias reboot='sudo /sbin/reboot'
# Launch the Python Simple HTTP Server
alias serve='python -m SimpleHTTPServer'
# Generate a SHA1 digest
alias sha1='openssl sha1'
# Generate SHA256 digest
alias sha256='openssl sha256'
# Shutdown the computer
alias shutdown='sudo /sbin/shutdown'
# Speed test
alias speedtest='wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip'
# Shortcut for config file
alias ssh-config='${EDITOR:code} ~/.ssh/config'
# Pastebin
alias sprunge='curl -F "sprunge=<-" http://sprunge.us'
# Disable Tor for current shell
alias toroff='source torsocks off'
# Enable Tor for current shell
alias toron='source torsocks on'
# Test Tor connection
alias tortest='curl --socks5-hostname 127.0.0.1:9050 --silent https://check.torproject.org/ | head -25'
# Unban IP address (e.g. unban 10.14.24.14)
alias unban='sudo fail2ban-client set sshd unbanip'
# Recursively encrypts files using Ansible Vault
alias unvault-dir='find . -type f -printf "%h/\"%f\" " | xargs ansible-vault decrypt'
# Alias for updating software
if command -v sysget > /dev/null; then
alias upgrade='sudo sysget update && sudo sysget upgrade'
else
# TODO - Add other package managers
if command -v apt-get > /dev/null; then
alias upgrade='sudo apt-get update && sudo apt-get upgrade'
fi
fi
# Recursively encrypts files using Ansible Vault
alias vault-dir='find . -type f -printf "%h/\"%f\" " | xargs ansible-vault encrypt'
# Shows nice looking report of weather
alias weather='curl -A curl wttr.in'
# Change .wget-hsts file location
alias wget="wget --hsts-file ~/.local/wget-hsts"
### Yarn
alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME/yarn/config"'
# Running this will update GPG to point to the current YubiKey
alias yubi-stub='gpg-connect-agent "scd serialno" "learn --force" /bye'