diff options
| author | Denis Chevalier <perso@denischevalier.fr> | 2026-08-03 21:09:25 +0200 |
|---|---|---|
| committer | Denis Chevalier <perso@denischevalier.fr> | 2026-08-03 21:09:25 +0200 |
| commit | fef7a7ef4fa31170ee78dfb774934feb84a88423 (patch) | |
| tree | e88b5afd2feae6f9755e2ab345e6bca15a567d6a /dotfiles/.bashrc | |
| download | postinstall-fef7a7ef4fa31170ee78dfb774934feb84a88423.tar.gz postinstall-fef7a7ef4fa31170ee78dfb774934feb84a88423.tar.bz2 postinstall-fef7a7ef4fa31170ee78dfb774934feb84a88423.zip | |
arch postinstall scripts
Diffstat (limited to 'dotfiles/.bashrc')
| -rw-r--r-- | dotfiles/.bashrc | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc new file mode 100644 index 0000000..df61f7a --- /dev/null +++ b/dotfiles/.bashrc @@ -0,0 +1,64 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# PATH +export PATH="$PATH:$(go env GOBIN):$(go env GOPATH)/bin" +export PATH="$HOME/.local/bin:$PATH" + +# editor and pager +export EDITOR=nvim +export PAGER='bat --style plain --color always' + +# suggest packages on command not found +source /usr/share/doc/pkgfile/command-not-found.bash + +# set autocd +shopt -s autocd + +# refresh win size after each command +shopt -s checkwinsize + +# vi mode +set -o vi + +# set history config +HISTCONTROL=ignoreboth +HISTSIZE=10000 +HISTFILESIZE=20000 +shopt -s histappend + +# sends a notification after long running job +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +# aliases +alias grep='grep --color=auto' + +alias l='ls -alF --color=auto' +alias la='ls -A --color=auto' +alias ls='ls -CF --color=auto' + +alias s='cd ..' +alias v=nvim +alias r='source ~/.bashrc' + +# PS1 +GIT_PS1_SHOWDIRTYSTATE=true +GIT_PS1_SHOWDIRTYSTATE=true +GIT_PS1_SHOWSTASHTSTATE=true +GIT_PS1_SHOWUNTRACKEDFILES=true +GIT_PS1_SHOWCONFLICTSTATE=true + +GIT_PS1_SHOWCOLORHINTS=true + +source ~/.git-prompt.sh +PROMPT_DIRTRIM=4 +PS1='\e[0;33m\]\u@\h\e[m\] ∴ \e[0;34m\]\w\e[m\]$(__git_ps1)\n \$ \[\e]0;\a\]' +PS2=' > ' + +# fastfetch +clear +fastfetch |
