-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
72 lines (60 loc) · 1.89 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
68
69
70
71
72
# _ _
# | |__ __ _ ___| |__ _ __ ___
# | '_ \ / _` / __| '_ \| '__/ __|
# _| |_) | (_| \__ \ | | | | | (__
# (_)_.__/ \__,_|___/_| |_|_| \___|
# Source wal colors
source "$HOME/.cache/wal/colors.sh"
cat ~/.cache/wal/sequences
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Default Programs
export EDITOR="vim"
export PAGER="less"
export TERMINAL="st"
export READER="mupdf"
# Aliases
alias gitdotf='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
alias ls='ls --color=auto'
alias ffp='firefox --private-window'
# export env variables
export PATH=$PATH:$HOME/.local/bin/
export SUDO_ASKPASS=$HOME/.local/bin/dmpass
# don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth
# Add to history instead of overriding it
shopt -s histappend
# History length
HISTSIZE=1000
HISTFILESIZE=2000
# Shell Prompt
PS1='[\u@\h \W]\$ '
# Color man pages
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}
extract () {
if [ -f "$1" ] ; then
case "$1" in
*.tar.bz2|*.tbz2) tar xjf "$1" ;;
*.tgz|*.tar.gz) tar xzf "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.7z|.rar) 7z x "$1" ;;
*.gz) gunzip "$1" ;;
*.tar) tar xf "$1" ;;
*.zip) unzip "$1" ;;
*.Z) uncompress "$1" ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}