61 lines
1.4 KiB
Bash
61 lines
1.4 KiB
Bash
#
|
|
# ~/.bashrc
|
|
#
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
# history settings
|
|
HISTCONTROL=ignoreboth # don't put duplicate lines or lines starting with space in the history.
|
|
HISTSIZE=1000
|
|
HISTFILESIZE=2000
|
|
|
|
source /usr/share/bash-completion/completions/git
|
|
source /usr/share/git/completion/git-prompt.sh
|
|
|
|
PS1=
|
|
PS1="$PS1"'\[\033[01;35m\]\u@\h' # user@host
|
|
PS1="$PS1"'\[\033[00m\]:' # seperator
|
|
PS1="$PS1"'\[\033[01;34m\]\w' # working directory
|
|
PS1="$PS1"'\[\033[01;93m\]$(__git_ps1)' # github branch
|
|
PS1="$PS1"'\[\033[00m\]\$ ' # shell sign
|
|
|
|
export EDITOR=nvim
|
|
|
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # coloured GCC warnings and errors
|
|
eval "$(_AUTO_CPUFREQ_COMPLETE=bash_source auto-cpufreq)"
|
|
|
|
#
|
|
# aliases
|
|
#
|
|
|
|
# aliases for colour
|
|
alias dir='dir --color=auto'
|
|
alias vdir='vdir --color=auto'
|
|
alias ls='ls -A --color=auto'
|
|
alias grep='grep --color=auto'
|
|
alias diff='diff --color'
|
|
alias ip='ip -c'
|
|
|
|
# application aliases
|
|
alias ncdu='ncdu --color=dark -t 16'
|
|
alias hyfetch='hyfetch --ascii-file $HOME/.config/hyfetch-ascii'
|
|
|
|
# aliases to avoid mistakes
|
|
alias cp='cp -i'
|
|
alias mv='mv -i'
|
|
#alias rm='rm -i'
|
|
|
|
alias py3='python3'
|
|
alias hgit="git --git-dir=$HOME/.home-conf.git --work-tree=$HOME"
|
|
|
|
__git_complete hgit __git_main
|
|
|
|
# opt out of dotnet's telenetry
|
|
DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
|
|
# cute lil hyfetch :3
|
|
if [[ $TERM == "xterm-kitty" ]]; then
|
|
hyfetch
|
|
fi
|