-
Notifications
You must be signed in to change notification settings - Fork 82
/
main.yml
214 lines (179 loc) · 8.8 KB
/
main.yml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
---
zsh_user: "{{ ansible_user_id }}"
# .zshrc config
zsh_hist_stamps: yyyy-mm-dd
zsh_share_history: no
zsh_update_interval: 30 # set 0 for disable autoupdates
zsh_editor: # mcedit
zsh_term: xterm-256color
zsh_mc_solarized_skin: no
zsh_path:
- "{{ zsh_fzf_path }}"
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /opt/homebrew/bin
zsh_load_etc_profile: yes
fzf_widgets: viasite-ansible/fzf-widgets # fork of sorenson-axial/fzf-widgets
#fzf_widgets: sorenson-axial/fzf-widgets # removed
#fzf_widgets: ytet5uy4/fzf-widgets # has bug with * in history
#zsh_antigen_repo: https://github.com/zsh-users/antigen.git
# patch broken compdef - https://github.com/zsh-users/antigen/pull/737
zsh_antigen_repo: https://github.com/viasite-ansible/antigen
zsh_antigen_version: patch-1
zsh_fzf_version: 0.52.1
zsh_antigen_bundles:
- { name: command-not-found, when: "{{ ansible_os_family != 'Darwin' }}" } # too slow on OSX
- { name: brew, when: "{{ ansible_os_family == 'Darwin' }}" }
- { name: docker, command: docker }
- { name: docker-compose, command: docker-compose }
- fancy-ctrl-z
- git-extras
- gnu-utils
- { name: httpie, command: http }
- { name: golang, command: go }
- { name: gulp, command: gulp }
- { name: helm, command: helm }
- { name: kubectl, command: kubectl }
- { name: pip, command: pip }
- { name: rake, command: rake }
- { name: symfony2, command: symfony }
- { name: systemd, command: systemctl }
- python
- { name: tmux, command: tmux }
- { name: vagrant, command: vagrant }
- { name: viasite/server-scripts, command: dbdump }
- { name: yarn, command: yarn }
# on zsh 4.3.10 autosuggestions breaks multiline commands with \
- { name: zsh-users/zsh-autosuggestions, when: "{{ zsh_version is version_compare('5.0', '>=') }}" }
- popstas/zsh-command-time
- { name: unixorn/autoupdate-antigen.zshplugin, when: "{{ zsh_update_interval > 0 }}" }
- { name: urbainvaes/fzf-marks, when: "{{ zsh_version is version_compare('5.1', '>=') }}" } # replaces jump plugin, mark, jump and Ctrl+G
- "{{ fzf_widgets }}"
# must be last, don't work on zsh < 4.3.17
#- { name: zsh-users/zsh-syntax-highlighting, when: "{{ zsh_version | default(false) is version_compare('4.3.17', '>=') }}" }
- { name: zdharma-continuum/fast-syntax-highlighting, when: "{{ zsh_version is version_compare('4.3.17', '>=') }}" }
zsh_antigen_bundles_extras: []
zsh_custom_before: '' # any code before include ~/.zshrc.local
zsh_custom_after: '' # any code before include ~/.zshrc.local
# useful for deploy many zsh users at host, without duplicate and without write access
zsh_shared: no
zsh_source_for_all_users: no
zsh_change_user_shell: yes
zsh_antigen_theme: "romkatv/powerlevel10k powerlevel10k"
zsh_hotkeys:
# home & end keys work
- { hotkey: '\e[1~', action: beginning-of-line }
- { hotkey: '\e[4~', action: end-of-line }
- { hotkey: '^[[H', action: beginning-of-line, bundle: brew } # home/end has different codes on MacOS
- { hotkey: '^[[F', action: end-of-line, bundle: brew }
- { hotkey: '^[[1;5D', action: backward-word, bundle: brew }
- { hotkey: '^[[1;5C', action: forward-word, bundle: brew }
- { hotkey: '[D', action: backward-word, bundle: brew }
- { hotkey: '[C', action: forward-word, bundle: brew }
# alt+M for insert last word
- { hotkey: '^[m', action: copy-earlier-word }
# fzf-widgets
- { hotkey: '^@' , action: fzf-select-widget, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@.' , action: fzf-edit-dotfiles, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@c', action: fzf-change-directory, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@f', action: fzf-edit-files, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@k', action: fzf-kill-processes, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@s', action: fzf-exec-ssh, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^\' , action: fzf-change-recent-directory, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^r', action: fzf-insert-history, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^xf', action: fzf-insert-files, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^xd', action: fzf-insert-directory, bundle: "{{ fzf_widgets }}" }
# fzf-widgets: Git
- { hotkey: '^@g', action: fzf-select-git-widget, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@ga', action: fzf-git-add-files, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@gc', action: fzf-git-change-repository, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@gco', action: fzf-git-checkout-branch, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@gd', action: fzf-git-delete-branches, bundle: "{{ fzf_widgets }}" }
# fzf-widgets: GitHub
- { hotkey: '^@gh', action: fzf-select-github-widget, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@ghi', action: fzf-github-show-issue, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@ghe', action: fzf-github-edit-issue, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@gho', action: fzf-github-open-issue, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@ghc', action: fzf-github-close-issue, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@ghco', action: fzf-github-comment-issue, bundle: "{{ fzf_widgets }}" }
# fzf-widgets: Docker
- { hotkey: '^@d', action: fzf-select-docker-widget, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@dk', action: fzf-docker-kill-containers, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@dl', action: fzf-docker-logs-container, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@dr', action: fzf-docker-remove-containers, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@dri', action: fzf-docker-remove-images, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@drv', action: fzf-docker-remove-volumes, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@dsa', action: fzf-docker-start-containers, bundle: "{{ fzf_widgets }}" }
- { hotkey: '^@dso', action: fzf-docker-stop-containers, bundle: "{{ fzf_widgets }}" }
# autosuggestions
- { hotkey: '{{ zsh_autosuggestions_bind_key }}', action: autosuggest-accept, bundle: zsh-users/zsh-autosuggestions }
- { hotkey: '{{ zsh_autosuggestions_bind_key_2 }}', action: autosuggest-accept, bundle: zsh-users/zsh-autosuggestions }
zsh_hotkeys_extras: []
# only single quotes allowed in action
zsh_aliases:
- { alias: 'apt-update-list-upgrade', action: 'apt update && apt upgrade --dry-run | grep Inst | sort | fzf && apt upgrade' }
- { alias: 'dfh', action: 'df -h | grep -v docker' }
- { alias: 'ubuntu-release', action: 'lsb_release -a' }
- { alias: '', action: '' }
# zsh-autosuggestions
zsh_autosuggestions_max_length: 15
zsh_autosuggestions_bind_key: ""
zsh_autosuggestions_bind_key_2: ""
# fzf
zsh_fzf_path: "$HOME/bin"
zsh_fzf_height: "100%"
zsh_fzf_reverse: yes
zsh_fzf_border: no
zsh_fzf_ctrl_r_opts: '--exact'
# command-time
zsh_command_time_min_seconds: 3
zsh_command_time_echo: ""
# powerlevel9k
zsh_powerlevel9k_left_prompt:
- context
- dir
zsh_powerlevel9k_right_prompt:
- status
- background_jobs
- vcs
- command_execution_time
- time
zsh_powerlevel_custom_elements:
- name: command_time
command: "zsh_command_time"
background: "248"
foreground: "000"
zsh_powerlevel9k_hide_host_on_local: yes
zsh_powerlevel9k_always_show_context: no # hide hostname and username from prompt on local machine
zsh_powerlevel9k_always_show_user: no # hide username from prompt on local machine
zsh_powerlevel9k_prompt_on_newline: no
zsh_powerlevel9k_shorten_dir_length: 3
zsh_powerlevel9k_status_verbose: 0
# separators
zsh_segment_separators: yes
# dir (context) colors
zsh_powerlevel9k_context_default_foreground: "255" # white
zsh_powerlevel9k_context_default_background: "024" # blue
zsh_powerlevel9k_context_root_foreground: "255" # white
zsh_powerlevel9k_context_root_background: "124" # red
zsh_powerlevel9k_dir_foreground: "255" # white
zsh_powerlevel9k_dir_background: "240" # gray
zsh_powerlevel9k_dir_etc_foreground: "{{ zsh_powerlevel9k_dir_foreground }}"
zsh_powerlevel9k_dir_etc_background: "{{ zsh_powerlevel9k_dir_background }}"
zsh_powerlevel9k_dir_path_highlight_foreground: "{{ zsh_powerlevel9k_dir_foreground }}"
zsh_powerlevel9k_dir_path_highlight_background: "{{ zsh_powerlevel9k_dir_background }}"
# vcs colors
# list colors: for code ({000..255}) print -P -- "$code: %F{white}%K{$code}user@hostname%f%k\n\n"
zsh_powerlevel9k_vcs_foreground: "232" # about black on any palette
zsh_powerlevel9k_vcs_clean_background: "100" # dirty green
zsh_powerlevel9k_vcs_modified_background: "094" # orange
zsh_powerlevel9k_vcs_untracked_background: "094" # orange
# command execution time
zsh_powerlevel9k_command_execution_time_foreground: "000"
zsh_powerlevel9k_command_execution_time_background: "248"
# powerlevel10k
zsh_powerlevel10k_instant_prompt: yes