-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.fish
86 lines (69 loc) · 2.26 KB
/
config.fish
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# filelocation: ~/.config/fish/
# Ajustes de path
set PATH ~/bin/ $PATH
set PATH ~/.cargo/bin/ $PATH
set PATH ~/scripts/ $PATH
set PATH ~/Programs/ $PATH
set PATH ./node_modules/ $PATH
# Incluindo SDK do android
set PATH ~/work/.android-sdk/platform-tools $PATH
set PATH ~/work/.android-sdk/tools $PATH
set PATH ~/work/.android-sdk/build-tools/20.0.0 $PATH
set ANDROID_HOME /home/marcus/work/.android-sdk/
set ANDROID_TOOLS /home/marcus/work/.android-sdk/
set ANDROID_PLATFORM_TOOLS /home/marcus/work/.android-sdk/
# Incluindo path do PyEnv
set PYENV_ROOT "$HOME/.pyenv"
set PATH "$PYENV_ROOT/bin" $PATH
set PATH ~/work/.jdk/bin/ $PATH
set JAVA_HOME /home/marcus/work/.jdk/
set ANT_HOME /usr/bin/
set CLASSPATH /home/marcus/work/.jdk/
# Configurando o terminal para 256 cores
set TERM xterm-256color
# Desligando Pycache
set PYTHONDONTWRITEBYTECODE 1
# Warnings DBUS
set NO_AT_BRIDGE 1
# Adicionando workon - Deve ser após modificar o path.
. ~/bin/fishenv/fishenv.fish
# Alias
alias abre="exo-open"
alias cv="xclip -se c"
alias notas="vim ~/.notes"
alias pyserver="python -m SimpleHTTPServer"
alias temp="watch -n,5 sensors"
alias usage="du -sh * | sort -h | tac"
alias vimdiff="vim (git s | egrep -e '^ M|^\?\?' | egrep -v -e '\/\$' | sed -r 's/\?\?/ M/g' | cut -d' ' -f 3) -p"
function fuck
eval sudo $history[1]
end
function mkcd
mkdir $argv
cd $argv
end
# Configurar git no fish
set fish_git_dirty_color red
set fish_git_not_dirty_color green
function parse_git_branch
set -l branch (git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/\1/')
set -l git_diff (git diff)
if test -n "$git_diff"
echo (set_color $fish_git_dirty_color)$branch(set_color normal)
else
echo (set_color $fish_git_not_dirty_color)$branch(set_color normal)
end
end
function fish_prompt
if test -d .git
printf '%s@%s %s%s%s:%s> ' (whoami) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) (parse_git_branch)
else
printf '%s@%s %s%s%s> ' (whoami) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
end
end
# TurnOn pyenv
status --is-interactive; and . (pyenv init -|psub)
status --is-interactive; and . (pyenv virtualenv-init -|psub)
# Por fim abre o tmux
# opção -2 para abrir em 256 cores
tmux -2