-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
82 lines (72 loc) · 2.27 KB
/
.zshrc
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
autoload -U colors compinit
colors
compinit
# Aliases
# =======
alias ls="ls --color"
alias ll="ls -lah"
alias lh="ls -Ad .*"
alias l="ls"
alias top="htop"
alias tvon="xrandr --output HDMI-0 --mode 1920x1080 --pos 1368x0 && xrandr --output LVDS --mode 1366x768 && feh --bg-fill /home/fredrik/media/pictures/wallpaper/cubic.jpg"
alias workon="xrandr --output VGA-0 --mode 1680x1050 --left-of LVDS --rotate right && xrandr --output LVDS --mode 1366x768 && feh --bg-fill /home/fredrik/media/pictures/wallpaper/chrono-trinity1920x1080.jpg"
alias tvoff="xrandr --output HDMI-0 --off"
alias workoff="xrandr --output VGA-0 --off"
#alias matlab="wmname LG3D && ~/bin/matlab/bin/matlab"
#alias mendeley="~/bin/mendeleydesktop/bin/mendeleydesktop"
#alias uimlist="uim-toolbar-gtk"
alias postman="chromium --app-id=fhbjgbiflinjbdggehcddcbncdddomop"
# Variables
# =========
export LC_CTYPE="en_US.UTF-8"
#export TERM="rxvt-unicode-256color"
export EDITOR="vim"
export VISUAL="vim"
export PATH=$PATH:~/.gem/ruby/2.2.0/bin
# Tab completion
# ==============
zstyle ':completion:*' menu select
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*' list-colors ${(s/:/)LS_COLORS}
zstyle ':completion:*:*:kill*:*:processes' list-colors "=(#b) #([0-9]#)*=36=31"
zstyle ':completion:*:*:kill*:*' menu yes select
# Misc fixes
# ==========
setopt AUTO_CD
unsetopt correct_all
# Key bindings
# ============
bindkey -v
bindkey "^R" history-incremental-search-backward
bindkey -s '^U' 'cd ..; ls^M'
# Functions
# =========
#function taskcount {
# echo $(t |wc -l | sed -e's/ *//')
#}
#function bugcount {
# count=$(b | wc -l | sed -e's/ *//')
# if [[ $count == 0 ]]; then
# echo %{$fg[green]%}0%{$reset_color%}
# else
# echo %{$fg[red]%}0%{$reset_color%}
# fi
#}
#function promptchar {
# hg root >/dev/null 2>/dev/null && echo '☿' && return
# echo '○'
#}
function exitCode {
if [ $1 -eq 0 ]; then
echo -n %{$fg[green]%}0%{$reset_color%}
else
echo -n %{$fg[red]%}A%{$reset_color%}
fi
}
# Prompt
# ======
export PROMPT="%{$fg[blue]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%~> "
export RPROMPT="[%(?.%{$fg[green]%}%?.%{$fg[red]%}%?)%{$reset_color%}]"
#export RPROMPT="[$(promptchar)]"
#export RPROMPT="[$(bugcount)|$(taskcount)]"
#export RPROMPT="[$(promptchar)|$(bugcount)|$(taskcount)]"