79 lines
2.2 KiB
Bash
79 lines
2.2 KiB
Bash
# ~/.bashrc: executed by bash(1) for non-login shells.
|
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
|
# for examples
|
|
|
|
# history settings
|
|
HISTSIZE=5000
|
|
HISTFILESIZE=10000
|
|
|
|
shopt -s histappend
|
|
|
|
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
|
|
|
|
export HISTCONTROL=erasedups
|
|
|
|
# check the window size after each command and, if necessary,
|
|
# update the values of LINES and COLUMNS.
|
|
shopt -s checkwinsize
|
|
|
|
# If set, the pattern "**" used in a pathname expansion context will
|
|
# match all files and zero or more directories and subdirectories.
|
|
shopt -s globstar
|
|
|
|
# automatically prepend cd when entering just a path in the shell
|
|
shopt -s autocd
|
|
|
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
|
export TERM=xterm-color
|
|
|
|
# Alias definitions.
|
|
[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
|
|
|
|
# set PATH so it includes certain bin folders if they exist
|
|
[[ -d ~/bin ]] && PATH+=":$HOME/bin"
|
|
[[ -d ~/.local/bin ]] && PATH+=":$HOME/.local/bin"
|
|
[[ -d ~/scripts/bin ]] && PATH+=":$HOME/scripts/bin"
|
|
[[ -d /usr/local/go/bin ]] && PATH+=":/usr/local/go/bin"
|
|
|
|
# source misc user scripts
|
|
if [ -d ~/git/dotfiles/source ]; then
|
|
for f in ~/git/dotfiles/source/.*; do if [[ -f $f ]]; then source $f ; fi; done
|
|
fi
|
|
|
|
# set prompt colors and style
|
|
[[ -f ~/.PS1 ]] && . ~/.PS1 ||
|
|
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ '
|
|
|
|
# fetch uninstalled package names when attempting command (arch only)
|
|
PKG_COMP=/usr/share/doc/pkgfile/command-not-found.bash
|
|
[[ -f $PKG_COMP ]] && . $PKG_COMP
|
|
|
|
# source fzf scripts
|
|
if [ -d ~/.fzf ]; then
|
|
source ~/.fzf/completion.bash
|
|
source ~/.fzf/key-bindings.bash
|
|
fi
|
|
|
|
# source client specific scripts
|
|
if [ -d ~/.client ]; then
|
|
for f in ~/.client/.*; do if [[ -f $f ]]; then source $f ; fi; done
|
|
fi
|
|
|
|
# source: https://stackoverflow.com/a/44232192
|
|
PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"
|
|
|
|
if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
|
|
export MOZ_ENABLE_WAYLAND=1
|
|
export QT_QPA_PLATFORM=wayland-egl
|
|
fi
|
|
|
|
# pnpm
|
|
export PNPM_HOME="/home/matt/.local/share/pnpm"
|
|
case ":$PATH:" in
|
|
*":$PNPM_HOME:"*) ;;
|
|
*) export PATH="$PNPM_HOME:$PATH" ;;
|
|
esac
|
|
# pnpm end
|
|
|
|
[ -x "$(command -v pokemon-colorscripts)" ] &&
|
|
pokemon-colorscripts -r
|