diff options
Diffstat (limited to 'bash')
| -rw-r--r-- | bash/.bash_profile | 11 | ||||
| -rw-r--r-- | bash/.bashrc | 54 |
2 files changed, 65 insertions, 0 deletions
diff --git a/bash/.bash_profile b/bash/.bash_profile new file mode 100644 index 0000000..27b8539 --- /dev/null +++ b/bash/.bash_profile @@ -0,0 +1,11 @@ +# +# ~/.bash_profile +# + +export PATH="${PATH}:$HOME/.gem/ruby/2.7.0/bin:$HOME/.local/bin" +export EDITOR="nvim" +export TERMINAL="alacritty" +export BROWSER="brave" +export TESSDATA_PREFIX=/usr/share/tessdata + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/bash/.bashrc b/bash/.bashrc new file mode 100644 index 0000000..0fe0b47 --- /dev/null +++ b/bash/.bashrc @@ -0,0 +1,54 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# vi mode +set -o vi + +# aliases +alias ls='ls --color=auto --group-directories-first' +alias ll='ls -lAh' +alias cat='bat -p' +alias mocp='mocp -M "~/.config/moc"' +alias ssh='TERM=rxvt ssh' # fix alacritty term issues +alias ..='cd ..' + +# see https://www.atlassian.com/git/tutorials/dotfiles +# and https://youtu.be/tBoLDpTWVOM +alias config='/usr/bin/git --git-dir=$HOME/Documents/dotfiles --work-tree=$HOME' + +alias brc='nvim ~/.bashrc && source ~/.bashrc' +alias vrc='nvim ~/.config/nvim/init.vim' + +alias v='nvim' +alias fsl='fossil' + +PS1='[\u@\h \W]\$ ' + +# use gpg authentication key for ssh auth +SSH_AUTH_SOCK=$( gpgconf --list-dirs agent-ssh-socket ) +export SSH_AUTH_SOCK +gpgconf --launch gpg-agent + +# fzf bindings and tweaks +source /usr/share/fzf/key-bindings.bash +source /usr/share/fzf/completion.bash +export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git' +# shellcheck disable=SC2016 +export FZF_CTRL_T_COMMAND='$FZF_DEFAULT_COMMAND' + +FOSSILS_HOME=$HOME/Documents/Fossils +export FOSSILS_HOME + +# quickly cd into fossil repo +fslcd() { + _fsl_checkout=$(fossil all ls -c | fzf +m) + cd "$_fsl_checkout" || return +} + +# starship prompt +eval "$(starship init bash)" + |
