diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2021-07-12 16:27:52 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2021-07-12 16:27:52 +0300 |
| commit | e3bbee81de559c1b4dea7a83d46da3b4e00cc2a8 (patch) | |
| tree | 697bca3add8a534bd6ed6a82308ef5869cc78393 /bash | |
| parent | 2d5fa70da78d05147a4055c51c983b93a4bc32dd (diff) | |
| download | dotfiles-e3bbee81de559c1b4dea7a83d46da3b4e00cc2a8.tar.gz dotfiles-e3bbee81de559c1b4dea7a83d46da3b4e00cc2a8.zip | |
move to GNU stow approach on managing dotfiles
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)" + |
