-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathexample_config.zsh
62 lines (41 loc) · 2.22 KB
/
example_config.zsh
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
# this is an example configuration file for zsh powerline prompt. it shows
# various configuration features and some hooks which you may or may not find
# helpful, and which are supported by the powerline prompt.
# add the directory this file resides in to fpath
fpath+=( $0(:h:a) )
# initialize the prompt contrib
autoload promptinit && promptinit || return 1
zmodload zsh/parameter
# has it been loaded correctly? if not, bail out early.
(( $+functions[prompt_powerline_setup] )) || return 2
# we can never know for sure powerline font is installed, but in my case if I'm
# on rxvt-unicode, chances are good. note that most zstyles have to be set
# before the prompt is loaded since they are not continuously re-evaluated.
[[ $TERM == "rxvt-unicode-256color" ]] || return 3
### additional zstyles
# set some fixed host colors
zstyle ':prompt:*:twilight*' host-color 093
zstyle ':prompt:*:pinkie*' host-color 201
zstyle ':prompt:*:rarity' host-color white
zstyle ':prompt:*:applejack' host-color 208
zstyle ':prompt:*:fluttershy' host-color 226
# only show username on remote server or if it's different from my default
[[ -n $SSH_CONNECTION || $USER == valodim ]] && zstyle ':prompt:powerline:ps1' hide-user 1
# enable check-for-changes, for the ¹² indicators in git
zstyle ':vcs_info:*:powerline:*' check-for-changes true
# if you are using the new powerline symbols, uncomment these lines.
# zstyle ':prompt:powerline:ps1' sep1-char ''
# zstyle ':prompt:powerline:ps1' sep2-char ''
# zstyle ':prompt:powerline:ps1' lock-char ''
# zstyle ':prompt:powerline:ps1' branch-char ''
### load some optional hooks which add further functionality. uncomment to enable.
# disambiguate the pathname instead of last three elements (/u/s/z/functions -> share/zsh/functions)
# source hooks/prompt-disambiguate.zsh
# show signal names instead of exit codes based on a heuristic (130 -> INT)
# source hooks/prompt-exitnames.zsh
# show commits ahead/behind of tracking branch, and number of stashed commits
# source hooks/vcs_info-githooks.zsh
# show lo-fi version of vcs info, saving load times in exchange for information
# source hooks/vcs_info-lofi.zsh
### done with configuration - actually select the prompt
prompt powerline