-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
67 lines (52 loc) · 1.84 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Common Aliases
alias ls='ls --color=auto'
alias ll='ls -lah'
alias clean-system='yes | yay -Sc'
alias upgrade-system='yay -Syu && yay -Qdt && yay -Rns $(yay -Qdtq)'
# powerline-shell
function _update_ps1() {
PS1=$(powerline-shell $?)
}
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
# Configure less as our pager
# Set "less" as default pager and replace all other pagers with it
export PAGER=less
alias more=${PAGER}
alias zless=${PAGER}
if [[ "${TERM}" != "dumb" ]]
then
# Colorize the output to make manpages more readable
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
fi
export LESSCHARSET='utf-8'
# Tweak other "less" parameters
# * Ignore case in searches
# * Suppress line numbers
# * Highlight new line after movement
# * Set scrolling window size to window size -4 lines
# * Allow color interpretation in source, but display all other control characters in caret notation
# * Set a very long prompt together with its format string
export LESS='-i -n -w -z-4 -R -X -F -M -PM%t?f%f :Standard Input .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...?m (Input %i of %m).'
# Make less more friendly for non-text input files, see lesspipe(1)
[[ -x /usr/bin/lesspipe.sh ]] && eval "$(SHELL=/bin/sh lesspipe.sh)"
# Disable less history file
LESSHISTFILE=/dev/null
# dotfiles config
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
source /usr/share/bash-completion/completions/git
__git_complete dotfiles __git_main
# Some fun
fortune | cowsay -n