2022-10-27 20:14:14 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# shellcheck disable=SC1090,SC1091
|
|
|
|
|
2022-10-28 01:27:45 -07:00
|
|
|
# Prefer US English
|
|
|
|
export LANG="en_US"
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
### Fig
|
2022-10-25 21:04:19 -07:00
|
|
|
if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then
|
|
|
|
if [ -f "$HOME/.fig/shell/bashrc.pre.bash" ]; then
|
|
|
|
. "$HOME/.fig/shell/bashrc.pre.bash"
|
|
|
|
fi
|
2022-09-30 06:09:35 -07:00
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
### ~/.profile
|
2022-09-30 06:09:35 -07:00
|
|
|
if [ -f "$HOME/.profile" ]; then
|
|
|
|
. "$HOME/.profile"
|
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
COLOR_SCHEME=dark # dark/light
|
|
|
|
|
|
|
|
alias ..='cd ..'
|
|
|
|
alias cp='cp -v'
|
|
|
|
alias rm='rm -I'
|
|
|
|
alias mv='mv -iv'
|
|
|
|
alias ln='ln -sriv'
|
|
|
|
alias xclip='xclip -selection c'
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v vim >/dev/null && alias vi='vim'
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
### Colorize commands
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
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'
|
|
|
|
|
|
|
|
### LS & TREE
|
|
|
|
alias ll='ls -la'
|
|
|
|
alias la='ls -A'
|
|
|
|
alias l='ls -F'
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v lsd >/dev/null && alias ls='lsd --group-dirs first' &&
|
|
|
|
alias tree='lsd --tree'
|
|
|
|
command -v colorls >/dev/null && alias ls='colorls --sd --gs' &&
|
|
|
|
alias tree='colorls --tree'
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
### CAT & LESS
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v bat >/dev/null &&
|
|
|
|
alias bat='bat --theme=ansi' &&
|
|
|
|
alias cat='bat --pager=never' &&
|
|
|
|
alias less='bat'
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
# in debian the command is batcat
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v batcat >/dev/null &&
|
|
|
|
alias batcat='batcat --theme=ansi' &&
|
|
|
|
alias cat='batcat --pager=never' &&
|
|
|
|
alias less='batcat'
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
### TOP
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v htop >/dev/null && alias top='htop'
|
|
|
|
command -v gotop >/dev/null && alias top='gotop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")'
|
|
|
|
command -v ytop >/dev/null && alias top='ytop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")'
|
|
|
|
command -v btm >/dev/null && alias top='btm $([ "$COLOR_SCHEME" = "light" ] && echo "--color default-light")'
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
# themes for light/dark color-schemes inside ~/.config/bashtop; Press ESC to open the menu and change the theme
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v bashtop >/dev/null && alias top='bashtop'
|
|
|
|
command -v bpytop >/dev/null && alias top='bpytop'
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
### Settings
|
2022-10-27 20:14:14 -07:00
|
|
|
if command -v shopt >/dev/null; then
|
2022-09-30 06:52:29 -07:00
|
|
|
shopt -s globstar
|
|
|
|
shopt -s histappend
|
|
|
|
shopt -s checkwinsize
|
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
HISTCONTROL=ignoreboth
|
|
|
|
HISTSIZE=5000
|
|
|
|
HISTFILESIZE=5000
|
|
|
|
HISTFILE=~/.bash_history
|
|
|
|
|
|
|
|
# Bash Completion
|
2022-10-25 01:37:36 -07:00
|
|
|
if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then
|
2022-09-30 06:58:48 -07:00
|
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
. /usr/share/bash-completion/bash_completion
|
2022-09-30 06:58:48 -07:00
|
|
|
elif [ -f /etc/bash_completion ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
. /etc/bash_completion
|
2022-09-30 06:58:48 -07:00
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
fi
|
|
|
|
|
2022-09-30 06:58:48 -07:00
|
|
|
# Prompt (on bash only)
|
2022-10-27 19:13:12 -07:00
|
|
|
if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then
|
2022-09-30 06:58:48 -07:00
|
|
|
# Add new line before prompt
|
|
|
|
PROMPT_COMMAND="PROMPT_COMMAND=echo"
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
|
|
. /etc/os-release
|
|
|
|
if [ -d /Applications ] && [ -d /Library ] && [ -d /System ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
# macOS
|
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'alpine' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'archlinux' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'centos' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'coreos' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'debian' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'deepin' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'elementary' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'endeavour' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'freebsd' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'gentoo' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'kali' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'linuxmint' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'manjaro' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'nixos' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'openbsd' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'opensuse' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'parrot' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'pop_os' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'raspberry_pi' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'redhat' ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'fedora' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 07:01:08 -07:00
|
|
|
elif [ "$ID" = 'ubuntu' ]; then
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 06:58:48 -07:00
|
|
|
else
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-30 06:58:48 -07:00
|
|
|
fi
|
2022-09-26 19:46:23 -07:00
|
|
|
else
|
2022-10-27 18:50:01 -07:00
|
|
|
OS_ICON=""
|
2022-09-26 19:46:23 -07:00
|
|
|
fi
|
2022-09-30 06:58:48 -07:00
|
|
|
|
|
|
|
# Set styled terminal prompt
|
|
|
|
case "$TERM" in
|
2022-10-27 20:14:14 -07:00
|
|
|
xterm* | rxvt* | Eterm | aterm | kterm | gnome* | alacritty)
|
|
|
|
PS1="\n \[\033[0;34m\]╭─\[\033[0;31m\]\[\033[0;37m\]\[\033[41m\] $OS_ICON \u \[\033[0m\]\[\033[0;31m\]\[\033[44m\]\[\033[0;34m\]\[\033[44m\]\[\033[0;30m\]\[\033[44m\] \w \[\033[0m\]\[\033[0;34m\] \n \[\033[0;34m\]╰ \[\033[1;36m\]\$ \[\033[0m\]"
|
|
|
|
;;
|
2022-09-30 06:58:48 -07:00
|
|
|
esac
|
2022-10-25 14:50:59 -07:00
|
|
|
|
|
|
|
# https://github.com/trapd00r/LS_COLORS
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v gdircolors >/dev/null 2>&1 || gdircolors() { dircolors "$@"; }
|
|
|
|
if type gdircolors &>/dev/null && [ -f "$HOME/.config/dircolors" ]; then
|
|
|
|
eval "$(gdircolors -b "$HOME/.config/dircolors")"
|
2022-10-25 14:50:59 -07:00
|
|
|
fi
|
2022-09-26 19:46:23 -07:00
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
### Miscellaneous
|
|
|
|
export VISUAL=vim
|
|
|
|
export EDITOR=$VISUAL
|
|
|
|
|
|
|
|
# enable terminal linewrap
|
2022-10-27 20:14:14 -07:00
|
|
|
setterm -linewrap on 2>/dev/null
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
|
|
|
# colorize man pages
|
|
|
|
export LESS_TERMCAP_mb=$'\e[1;32m'
|
|
|
|
export LESS_TERMCAP_md=$'\e[1;32m'
|
|
|
|
export LESS_TERMCAP_me=$'\e[0m'
|
|
|
|
export LESS_TERMCAP_se=$'\e[0m'
|
|
|
|
export LESS_TERMCAP_so=$'\e[01;33m'
|
|
|
|
export LESS_TERMCAP_ue=$'\e[0m'
|
|
|
|
export LESS_TERMCAP_us=$'\e[1;4;31m'
|
|
|
|
export LESSHISTFILE=-
|
|
|
|
|
|
|
|
### Functions
|
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
rgafzf() {
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
RG_PREFIX="rga --files-with-matches"
|
|
|
|
local file
|
|
|
|
file="$(
|
|
|
|
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \
|
|
|
|
fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \
|
2022-10-27 20:14:14 -07:00
|
|
|
--phony -q "$1" \
|
|
|
|
--bind "change:reload:$RG_PREFIX {q}" \
|
|
|
|
--preview-window="70%:wrap"
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
)" &&
|
2022-10-27 20:14:14 -07:00
|
|
|
echo "opening $file" &&
|
|
|
|
xdg-open "$file"
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
}
|
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
# Bash completions
|
2022-10-25 01:37:36 -07:00
|
|
|
if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then
|
2022-09-30 07:09:57 -07:00
|
|
|
### fd
|
|
|
|
[ -e /usr/local/src/fd/fd ] && source /usr/local/src/fd/autocomplete/fd.bash-completion
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### Hyperfine
|
|
|
|
[ -e /usr/local/src/hyperfine/hyperfine ] && source /usr/local/src/hyperfine/autocomplete/hyperfine.bash-completion
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### mcfly
|
|
|
|
export MCFLY_KEY_SCHEME=vim
|
|
|
|
[ -e /usr/local/src/mcfly/mcfly ] && eval "$(mcfly init bash)"
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### wp-cli
|
|
|
|
[ -e /usr/local/bin/wp ] && source /usr/local/src/wp-cli/wp-completion.bash
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### direnv
|
|
|
|
[ -e /usr/local/bin/direnv ] && eval "$(direnv hook bash)"
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### Googler
|
|
|
|
[ -e /usr/local/bin/googler ] && source /usr/local/src/googler/googler-completion.bash
|
|
|
|
[ -e /usr/local/bin/googler ] && source /usr/local/src/googler/googler_at
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### FZF
|
2022-10-24 15:53:42 -07:00
|
|
|
if [ -e fzf ]; then
|
|
|
|
if [ -f ~/.local/fzf/completion.bash ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
source ~/.local/fzf/completion.bash 2>/dev/null
|
2022-10-24 15:53:42 -07:00
|
|
|
fi
|
|
|
|
if [ -f ~/.local/fzf/key-bindings.bash ]; then
|
|
|
|
source ~/.local/fzf/key-bindings.bash
|
|
|
|
fi
|
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### Google Cloud SDK
|
2022-10-27 20:14:14 -07:00
|
|
|
if command -v brew >/dev/null; then
|
|
|
|
if [ -f "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc" ]; then
|
|
|
|
. "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc"
|
|
|
|
fi
|
|
|
|
if [ -f "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc" ]; then
|
|
|
|
. "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc"
|
|
|
|
fi
|
2022-09-30 07:09:57 -07:00
|
|
|
fi
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-09-30 07:09:57 -07:00
|
|
|
### zoxide
|
2022-10-27 20:14:14 -07:00
|
|
|
command -v zoxide >/dev/null && eval "$(zoxide init bash)"
|
Update dotfiles/.config/bashtop/bashtop.cfg, dotfiles/.config/inkscape/palettes/flat-remix-palette.gpl, dotfiles/.config/qt5ct/qt5ct.conf, dotfiles/.config/tilix/schemes/Flat-Remix.json, dotfiles/.local/share/qt5ct/colors/flat-remix-dark.conf, dotfiles/.local/share/qt5ct/colors/flat-remix-light.conf, dotfiles/.local/share/qt5ct/qss/fusion-simple-scrollbar.qss, dotfiles/.bashrc, .gitattributes, dotfiles/.gitconfig, dotfiles/.zshrc, dotfiles/.local/p10k.zsh, dotfiles/.local/antigen.zsh, dotfiles/.local/fzf.zsh, dotfiles/.profile
2022-08-29 18:45:16 -07:00
|
|
|
|
2022-10-25 19:45:43 -07:00
|
|
|
### MOTD
|
2022-10-27 20:14:14 -07:00
|
|
|
if [ -f "$HOME/.local/motd.sh" ] && { [ -n "$SSH_CONNECTION" ] && [ "$SHLVL" -eq 1 ] && [[ $- == *i* ]]; } || type qubes-vmexec &>/dev/null || type qubes-dom0-update &>/dev/null; then
|
2022-10-25 19:45:43 -07:00
|
|
|
if [ -z "$MOTD" ] || [ "$MOTD" -ne 0 ]; then
|
2022-10-27 20:14:14 -07:00
|
|
|
. "$HOME/.local/motd.sh"
|
|
|
|
|
|
|
|
# TODO - -- services
|
|
|
|
if [ -n "$SSH_CONNECTION" ]; then
|
|
|
|
bash_motd --banner --processor --memory --diskspace --services --docker --updates --letsencrypt --login
|
|
|
|
elif type qubes-vmexec &>/dev/null; then
|
|
|
|
bash_motd --banner --memory --diskspace --docker --updates
|
|
|
|
elif type qubes-dom0-update &>/dev/null; then
|
2022-10-28 02:00:22 -07:00
|
|
|
bash_motd --banner --memory --updates --login
|
|
|
|
else
|
|
|
|
bash_motd --banner --processor --memory --diskspace --services --docker --updates --letsencrypt --login
|
2022-10-27 20:14:14 -07:00
|
|
|
fi
|
2022-10-25 19:45:43 -07:00
|
|
|
fi
|
|
|
|
fi
|
2022-10-25 21:04:19 -07:00
|
|
|
|
|
|
|
### Fig
|
|
|
|
if [ -f "$HOME/.fig/shell/bashrc.post.bash" ]; then
|
|
|
|
. "$HOME/.fig/shell/bashrc.post.bash"
|
|
|
|
fi
|
2022-09-30 06:09:35 -07:00
|
|
|
fi
|