add gitignore
This commit is contained in:
parent
06008179df
commit
1322f9b961
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*packer_compiled.lua
|
||||||
@ -14,7 +14,16 @@ esac
|
|||||||
export EDITOR="/usr/bin/vim"
|
export EDITOR="/usr/bin/vim"
|
||||||
export VISUAL="/usr/bin/vim"
|
export VISUAL="/usr/bin/vim"
|
||||||
export PAGER="less"
|
export PAGER="less"
|
||||||
export FZF_DEFAULT_OPTS="--bind=ctrl-f:page-down,ctrl-b:page-up"
|
|
||||||
|
# bash history options
|
||||||
|
HISTSIZE= ;
|
||||||
|
HISTFILESIZE=
|
||||||
|
HISTCONTROL="ignoreboth:erasedups"
|
||||||
|
HISTTIMEFORMAT="%F %T "
|
||||||
|
|
||||||
|
|
||||||
|
##* aliases *##
|
||||||
|
# {{{
|
||||||
|
|
||||||
# ls options
|
# ls options
|
||||||
ls --version &> /dev/null
|
ls --version &> /dev/null
|
||||||
@ -25,14 +34,6 @@ else
|
|||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# bash history options
|
|
||||||
HISTSIZE= ;
|
|
||||||
HISTFILESIZE=
|
|
||||||
HISTCONTROL="ignoreboth:erasedups"
|
|
||||||
HISTTIMEFORMAT="%F %T "
|
|
||||||
|
|
||||||
##* aliases *##
|
|
||||||
|
|
||||||
# core utils (ls, grep, tree)
|
# core utils (ls, grep, tree)
|
||||||
alias l="ls ${LS_OPTS}"
|
alias l="ls ${LS_OPTS}"
|
||||||
alias ls="ls ${LS_OPTS}"
|
alias ls="ls ${LS_OPTS}"
|
||||||
@ -55,9 +56,6 @@ alias pathls='printf "%b\n" "${PATH//:/\\n}"'
|
|||||||
alias g="git"
|
alias g="git"
|
||||||
alias groot="cd $(git rev-parse --show-toplevel 2> /dev/null || echo -n ".")"
|
alias groot="cd $(git rev-parse --show-toplevel 2> /dev/null || echo -n ".")"
|
||||||
|
|
||||||
alias v="$EDITOR"
|
|
||||||
alias vi="$EDITOR"
|
|
||||||
|
|
||||||
alias tmls="tmux ls"
|
alias tmls="tmux ls"
|
||||||
alias tmlsc="tmux lsc"
|
alias tmlsc="tmux lsc"
|
||||||
alias tmks="tmux kill-session -t" # kill one session
|
alias tmks="tmux kill-session -t" # kill one session
|
||||||
@ -79,14 +77,18 @@ alias venvac="source venv/bin/activate"
|
|||||||
# linux gui things
|
# linux gui things
|
||||||
alias xo="xdg-open"
|
alias xo="xdg-open"
|
||||||
alias firefox-temp='firefox --profile $(mktemp -d) &> /dev/null &'
|
alias firefox-temp='firefox --profile $(mktemp -d) &> /dev/null &'
|
||||||
|
# mac gui things
|
||||||
|
alias o="open"
|
||||||
|
|
||||||
# compression/archives
|
# compression/archives
|
||||||
alias untar="tar -xvf"
|
alias untar="tar -xvf"
|
||||||
alias mktar="tar -caf"
|
alias mktar="tar -caf"
|
||||||
alias tarls="tar -tvf"
|
alias tarls="tar -tvf"
|
||||||
alias ungzip="gunzip"
|
alias ungzip="gunzip"
|
||||||
|
# }}}
|
||||||
|
|
||||||
##* color variables *##
|
##* color variables *##
|
||||||
|
#{{{
|
||||||
# color vars using tput or ANSI/VT100 Control sequences
|
# color vars using tput or ANSI/VT100 Control sequences
|
||||||
# check if tput is available
|
# check if tput is available
|
||||||
if [ -x "$(command -v tput)" ]; then
|
if [ -x "$(command -v tput)" ]; then
|
||||||
@ -135,8 +137,10 @@ else # or fallback to ANSI esacpe codes
|
|||||||
reset="\[\033[0m\]"; unesc_reset="\033[0m"
|
reset="\[\033[0m\]"; unesc_reset="\033[0m"
|
||||||
bold="\[\033[1m\]"; unesc_bold="\033[1m"
|
bold="\[\033[1m\]"; unesc_bold="\033[1m"
|
||||||
fi
|
fi
|
||||||
|
#}}}
|
||||||
|
|
||||||
##* functions *##
|
##* bash functions *##
|
||||||
|
# {{{
|
||||||
# concat common commands
|
# concat common commands
|
||||||
mkcd() { mkdir -p -- "$1" && cd "$1"; }
|
mkcd() { mkdir -p -- "$1" && cd "$1"; }
|
||||||
cdd() { [ -n "$1" ] && for i in $(seq 1 "$1"); do cd ..; done; }
|
cdd() { [ -n "$1" ] && for i in $(seq 1 "$1"); do cd ..; done; }
|
||||||
@ -261,10 +265,14 @@ watip() {
|
|||||||
curl ifconfig.co
|
curl ifconfig.co
|
||||||
# dig +short myip.opendns.com @resolver1.opendns.com
|
# dig +short myip.opendns.com @resolver1.opendns.com
|
||||||
}
|
}
|
||||||
|
#}}}
|
||||||
|
|
||||||
##* prompt stuff *##
|
|
||||||
|
## prompt settings (PS1) ##
|
||||||
|
# {{{
|
||||||
|
|
||||||
# git prompt function
|
# git prompt function
|
||||||
|
# {{{
|
||||||
parse_git() {
|
parse_git() {
|
||||||
BRANCH="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)"
|
BRANCH="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)"
|
||||||
STATUS="$(git status 2> /dev/null)"
|
STATUS="$(git status 2> /dev/null)"
|
||||||
@ -285,6 +293,7 @@ parse_git() {
|
|||||||
printf "\001${unesc_reset}${unesc_bold}${unesc_white}\002%s" "]"
|
printf "\001${unesc_reset}${unesc_bold}${unesc_white}\002%s" "]"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
# }}}
|
||||||
|
|
||||||
# *plain prompts*
|
# *plain prompts*
|
||||||
# PS1="\W \\$ "
|
# PS1="\W \\$ "
|
||||||
@ -300,7 +309,10 @@ parse_git() {
|
|||||||
# PS1="${bold}${white}\t ${bright_blue}\w\$(parse_git) ${white}\\$ ${reset}"
|
# PS1="${bold}${white}\t ${bright_blue}\w\$(parse_git) ${white}\\$ ${reset}"
|
||||||
# PS1="${bold}${bright_cyan}\u${bright_magenta}@${bright_yellow}\h${white}:${bright_blue}\w\$(parse_git)${white}\\$ ${reset}"
|
# PS1="${bold}${bright_cyan}\u${bright_magenta}@${bright_yellow}\h${white}:${bright_blue}\w\$(parse_git)${white}\\$ ${reset}"
|
||||||
# PS1="${bold}${bright_cyan}\u${bright_magenta}@${bright_yellow}\h${white}:${bright_blue}\w\$(parse_git)${white}\\$ ${reset}"
|
# PS1="${bold}${bright_cyan}\u${bright_magenta}@${bright_yellow}\h${white}:${bright_blue}\w\$(parse_git)${white}\\$ ${reset}"
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
## bash completions and integrations ##
|
||||||
|
# {{{
|
||||||
# bash autocompletion
|
# bash autocompletion
|
||||||
if ! shopt -oq posix; then
|
if ! shopt -oq posix; then
|
||||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
@ -313,9 +325,15 @@ fi
|
|||||||
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
|
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
|
||||||
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh;
|
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh;
|
||||||
|
|
||||||
|
# fzf shell integration
|
||||||
|
export FZF_DEFAULT_OPTS="--bind=ctrl-f:page-down,ctrl-b:page-up"
|
||||||
|
[ -f ~/.config/.fzf.bash ] && source ~/.config/.fzf.bash
|
||||||
|
# }}}
|
||||||
|
|
||||||
## paths ##
|
## paths ##
|
||||||
# language version managers #
|
# language version managers
|
||||||
# rbenv (ruby)
|
# {{{
|
||||||
|
# ruby (rbenv)
|
||||||
src_rbenv(){
|
src_rbenv(){
|
||||||
if command -v ruby > /dev/null && command -v gem > /dev/null; then
|
if command -v ruby > /dev/null && command -v gem > /dev/null; then
|
||||||
appendpath "$(ruby -r rubygems -e 'puts Gem.user_dir')/bin"
|
appendpath "$(ruby -r rubygems -e 'puts Gem.user_dir')/bin"
|
||||||
@ -327,7 +345,7 @@ src_rbenv(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# nvm (node)
|
# node (nvm)
|
||||||
src_nvm(){
|
src_nvm(){
|
||||||
if [ -d "$HOME/.nvm" ]; then
|
if [ -d "$HOME/.nvm" ]; then
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
@ -336,7 +354,7 @@ src_nvm(){
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# pyenv (python3)
|
# python3 (pyenv)
|
||||||
src_pyenv() {
|
src_pyenv() {
|
||||||
if [ -d "$HOME/.pyenv" ]; then
|
if [ -d "$HOME/.pyenv" ]; then
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
@ -356,6 +374,14 @@ fi
|
|||||||
|
|
||||||
# rust
|
# rust
|
||||||
[ -d "$HOME/.cargo" ] && appendpath "$HOME/.cargo/bin"
|
[ -d "$HOME/.cargo" ] && appendpath "$HOME/.cargo/bin"
|
||||||
|
#}}}
|
||||||
|
|
||||||
|
## macOS package managers and specific config ##
|
||||||
|
# {{{
|
||||||
|
# homebrew
|
||||||
|
[ -d "/opt/homebrew/bin" ] && appendpath "/opt/homebrew/bin"
|
||||||
|
# python3 (macOS)
|
||||||
|
[ -d "$HOME/Library/Python/3.8/bin" ] && appendpath "$HOME/Library/Python/3.8/bin"
|
||||||
|
|
||||||
# local bins
|
# local bins
|
||||||
# [ -d "$HOME/.local/bin" ] && appendpath "$HOME/.local/bin"
|
# [ -d "$HOME/.local/bin" ] && appendpath "$HOME/.local/bin"
|
||||||
@ -363,14 +389,21 @@ fi
|
|||||||
|
|
||||||
# local rc
|
# local rc
|
||||||
[ -r "$HOME/.config/bashrc" ] && source "$HOME/.config/bashrc"
|
[ -r "$HOME/.config/bashrc" ] && source "$HOME/.config/bashrc"
|
||||||
|
#}}}
|
||||||
|
|
||||||
## macOS package managers ##
|
## alias to *new* and *improved* unix cli tools (exa, bat, nvim)
|
||||||
# homebrew
|
# Check for nvim and set as editor after paths are added
|
||||||
[ -d "/opt/homebrew/bin" ] && appendpath "/opt/homebrew/bin"
|
NVIM=$(command -v nvim)
|
||||||
# python3 (macOS)
|
if [ -x "$NVIM" ]; then
|
||||||
[ -d "$HOME/Library/Python/3.8/bin" ] && appendpath "$HOME/Library/Python/3.8/bin"
|
EDITOR="$NVIM"
|
||||||
|
VISUAL="$NVIM"
|
||||||
|
fi
|
||||||
|
alias v="$EDITOR"
|
||||||
|
alias vi="$EDITOR"
|
||||||
|
alias vim="$EDITOR"
|
||||||
|
|
||||||
|
# dead code
|
||||||
|
# {{{
|
||||||
# start in tmux session if possible
|
# start in tmux session if possible
|
||||||
# if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
# if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||||
# exec tmux
|
# exec tmux
|
||||||
@ -383,5 +416,6 @@ fi
|
|||||||
# if ! shopt -q histappend 2> /dev/null; then shopt -s histappend; fi
|
# if ! shopt -q histappend 2> /dev/null; then shopt -s histappend; fi
|
||||||
# if ! shopt -q extglob 2> /dev/null; then shopt -s extglob; fi
|
# if ! shopt -q extglob 2> /dev/null; then shopt -s extglob; fi
|
||||||
# if ! shopt -q globstar 2> /dev/null; then shopt -s globstar; fi
|
# if ! shopt -q globstar 2> /dev/null; then shopt -s globstar; fi
|
||||||
|
# }}}
|
||||||
|
|
||||||
# vim:ft=sh
|
# vim:ft=sh
|
||||||
|
|||||||
1
config/nvim/init.lua
Symbolic link
1
config/nvim/init.lua
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
.config/nvim/init.lua
|
||||||
1
config/nvim/lua
Symbolic link
1
config/nvim/lua
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
.config/nvim/lua
|
||||||
@ -329,3 +329,5 @@ if [ ! -f "$ZSH_SYNTAX_HIGHLIGHT_PATH" ]; then
|
|||||||
ZSH_SYNTAX_HIGHLIGHT_PATH="/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
ZSH_SYNTAX_HIGHLIGHT_PATH="/usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||||
fi
|
fi
|
||||||
[ -f "$ZSH_SYNTAX_HIGHLIGHT_PATH" ] && source $ZSH_SYNTAX_HIGHLIGHT_PATH
|
[ -f "$ZSH_SYNTAX_HIGHLIGHT_PATH" ] && source $ZSH_SYNTAX_HIGHLIGHT_PATH
|
||||||
|
|
||||||
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user