-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinux.yaml
190 lines (181 loc) · 6.83 KB
/
linux.yaml
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
os: linux
metadata:
name: Zsh Starter
description: Set up Zsh shell with useful plugins
stages:
- metadata:
name: Zsh Shell
url: https://www.zsh.org/
steps:
- metadata:
name: Install
execute:
run:
- sudo apt-get update
- sudo apt-get install -y git curl python2-minimal
- sudo apt-get install -y zsh
rollback:
run:
- sudo apt-get remove -y zsh
- metadata:
name: Oh-my-Zsh
url: https://github.com/robbyrussell/oh-my-zsh
steps:
- execute:
run:
- sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
rollback:
run:
- yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/uninstall.sh)"
- metadata:
name: Useful Oh-my-Zsh packages
steps:
- metadata:
name: zsh-completions
url: https://github.com/zsh-users/zsh-completions
execute:
run:
- git clone https://github.com/zsh-users/zsh-completions.git ~/.oh-my-zsh/custom/plugins/zsh-completions
- sed -i 's/^plugins=(/plugins=(\ zsh-completions\ /g' ~/.zshrc
rollback:
run:
- rm -rf ~/.oh-my-zsh/custom/plugins/zsh-completions
- sed -i 's/\ zsh-completions\ /\ /g' ~/.zshrc
- metadata:
name: zsh-autosuggestions
url: https://github.com/zsh-users/zsh-autosuggestions
execute:
run:
- git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
- sed -i 's/^plugins=(/plugins=(\ zsh-autosuggestions\ /g' ~/.zshrc
rollback:
run:
- rm -rf ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
- sed -i 's/\ zsh-autosuggestions\ /\ /g' ~/.zshrc
- metadata:
name: zsh-syntax-highlighting
url: https://github.com/zsh-users/zsh-syntax-highlighting
execute:
run:
- git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
- sed -i 's/^plugins=(/plugins=(\ zsh-syntax-highlighting\ /g' ~/.zshrc
rollback:
run:
- rm -rf ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
- sed -i 's/\ zsh-syntax-highlighting\ /\ /g' ~/.zshrc
- metadata:
name: zsh-directory-history
url: https://github.com/tymm/zsh-directory-history
execute:
run:
- git clone https://github.com/tymm/zsh-directory-history ~/.oh-my-zsh/custom/plugins/zsh-directory-history
- sudo cp ~/.oh-my-zsh/custom/plugins/zsh-directory-history/dirhist /usr/local/bin/
- echo "source ~/.oh-my-zsh/custom/plugins/zsh-directory-history/directory-history.plugin.zsh" >> ~/.zshrc
- echo "bindkey '\\e[A' directory-history-search-backward" >> ~/.zshrc
- echo "bindkey '\\e[B' directory-history-search-forward" >> ~/.zshrc
- echo "bindkey '^P' history-substring-search-up" >> ~/.zshrc
- echo "bindkey '^N' history-substring-search-down" >> ~/.zshrc
rollback:
run:
- rm -rf ~/.oh-my-zsh/custom/plugins/zsh-directory-history
- rm /usr/local/bin/dirhist
- sed -i "/^source ~\/.oh-my-zsh\/custom\/plugins\/zsh-directory-history\/directory-history\.plugin\.zsh/d" ~/.zshrc
- sed -i "/^bindkey .* directory-history-search-backward/d" ~/.zshrc
- sed -i "/^bindkey .* directory-history-search-forward/d" ~/.zshrc
- sed -i "/^bindkey .* history-substring-search-up/d" ~/.zshrc
- sed -i "/^bindkey .* history-substring-search-down/d" ~/.zshrc
- metadata:
name: z
url: https://github.com/rupa/z
execute:
run:
- git clone https://github.com/rupa/z.git ~/.oh-my-zsh/custom/z
- sed -i 's/^plugins=(/plugins=(\ z\ /g' ~/.zshrc
rollback:
run:
- rm -rf ~/.oh-my-zsh/custom/z
- sed -i 's/\ z\ /\ /g' ~/.zshrc
- metadata:
name: Enable npm plugin
execute:
run:
- sed -i 's/^plugins=(/plugins=(\ npm\ /g' ~/.zshrc
rollback:
run:
- sed -i 's/\ npm\ /\ /g' ~/.zshrc
- metadata:
name: Enable docker plugin
execute:
run:
- sed -i 's/^plugins=(/plugins=(\ docker\ /g' ~/.zshrc
rollback:
run:
- sed -i 's/\ docker\ /\ /g' ~/.zshrc
- metadata:
name: Enable kubectl plugin
execute:
run:
- sed -i 's/^plugins=(/plugins=(\ kubectl\ /g' ~/.zshrc
rollback:
run:
- sed -i 's/\ kubectl\ /\ /g' ~/.zshrc
- metadata:
name: Pure Prompt
url: https://github.com/sindresorhus/pure
steps:
- metadata:
name: Download
execute:
run:
- git clone https://github.com/sindresorhus/pure.git ~/.zsh/pure
rollback:
run:
- rm -rf ~/.zsh/pure
- metadata:
name: Install
execute:
run:
- echo "fpath+=\$HOME/.zsh/pure" >> ~/.zshrc
- echo "autoload -U promptinit; promptinit" >> ~/.zshrc
- echo "prompt pure" >> ~/.zshrc
- sed -i'' -e 's/^ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"\"/g' ~/.zshrc
shell: zsh
rollback:
run:
- sed -i '' "/^fpath\+=\$HOME\/\.zsh\/pure/d" ~/.zshrc
- sed -i '' "/^autoload -U promptinit; promptinit/d" ~/.zshrc
- sed -i '' "/^prompt pure/d" ~/.zshrc
- sed -i'' -e 's/^ZSH_THEME=\"\"/ZSH_THEME=\"robbyrussell\"/g' ~/.zshrc
- metadata:
name: Powerline fonts
url: https://github.com/powerline/fonts
steps:
- metadata:
name: Download
execute:
run:
- git clone https://github.com/powerline/fonts ~/.terminer/powerline-fonts
- metadata:
name: Install
execute:
run:
- ~/.terminer/powerline-fonts/install.sh
- rm -rf ~/.terminer/powerline-fonts
- echo "**NOTE:** Fonts installed successfully. After recipe installation, set the 'Meslo' font in your terminal emulator."
rollback:
run:
- git clone https://github.com/powerline/fonts ~/.terminer/powerline-fonts
- ~/.terminer/powerline-fonts/uninstall.sh
- rm -rf ~/.terminer/powerline-fonts
root: true
- metadata:
name: Set as default shell
steps:
- execute:
run:
- chsh -s $(which zsh)
root: true
rollback:
run:
- chsh -s $(which bash)
root: true