-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
69 lines (51 loc) · 1.53 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
#############################
# Author: abijr
#############################
alias ls='ls --color=auto --group-directories-first -p'
alias ll='ls --color | less'
alias ..='cd ..'
alias :q='exit'
alias xterm='xterm -vb'
alias todo='gvi ~/todo'
# Git stuff
alias gita='git add'
alias gito='git push origin master'
alias gitc='git commit -m'
# Tell firefox to ignore gtk theme
alias open='xdg-open'
#other
alias netcat='nc6'
_isroot=false
[ $UID -eq 0 ] && _isroot=true
if ! $_isroot; then
alias pacman='sudo pacman'
alias cpac='sudo pacman-color'
fi
# Define something using google
# Taken from brisbin's .bashrc
define() {
which lynx &>/dev/null || return 1
local lang="${LANG%%_*}"
local charset="${LANG##*.}"
lynx -accept_all_cookies -dump -hiddenlinks=ignore -nonumbers -assume_charset="$charset" -display_charset="$charset" "http://www.google.com/search?hl=$lang&q=define%3A+$1&btnG=Google+Search" | grep -m 5 -C 2 -A 5 -w "*" > /tmp/define
if [ ! -s /tmp/define ]; then
echo -e "No definition found.\n"
else
echo -e "$(grep -v Search /tmp/define | sed "s/$1/\\\e[1;32m&\\\e[0m/g")\n"
fi
rm -f /tmp/define
}
# PS1 :: Bash promt
PS1='\033[0;;32m{ \033[0;;m\u \033[0;;32m} \033[0;1;31m:: \033[0;;m[ \h ] \033[0;1;31m:: \033[0;;m[ \W ] \n [[ \$ ]] >> '
eval `dircolors -b`
set -o vi
# Exports
export EDITOR="vim"
export LANG=en_EN.utf8
export LC_ALL=en_US.utf8
export BROWSER="firefox"
export TERM=xterm-256color
export MAIL=/home/abijr/Mail/inbox
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus