-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·258 lines (220 loc) · 5.61 KB
/
install.sh
File metadata and controls
executable file
·258 lines (220 loc) · 5.61 KB
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
#!/bin/bash
#
echo $1
exit
rm /tmp/install.log
# set some colors
NT="[\e[1;36mNOTE\e[0m]"
OK="[\e[1;32mOK\e[0m]"
ER="[\e[1;31mERROR\e[0m]"
AT="[\e[1;37mATTENTION\e[0m]"
WR="[\e[1;35mWARNING\e[0m]"
AC="[\e[1;33mACTION\e[0m]"
LOOG="/tmp/install.log"
progress() {
echo -en "$AC Progress: "
while ps | grep $1 &> /dev/null ; do
echo -n "."
sleep 2
done
echo -en " => done!\n"
sleep 2
}
install() {
if yay -Q $1 &>>/dev/null ; then
echo -e "$OK $1 already installed"
else
echo -e "Starting to Install $1"
yay -S --noconfirm $1 &>> $LOOG &
progress $!
if yay -Q $1 &>>/dev/null ; then
echo -e "\e$OK $1 Installed"
else
echo -e "\e$ER $1 failed to install please check $LOOG"
exit
fi
fi
}
sudo echo "Installation running"
prepare=(
python-pip
usbutils
)
hyprland=(
hyprland
hyprpaper # wallpaper
hyprlock # Lock
hypridle # Idle
xdg-desktop-portal-hyprland
grim
slurp
wl-clipboard
qt5-wayland
gtk-layer-shell
)
qtile=(
qtile
python-iwlib
python-psutil
)
nvim=(
neovim
nvim-packer-git
fzf #Search alternatif
ripgrep #Search alternate
luarocks #Lua dependency
)
software=(
greetd
greetd-tuigreet
fastfetch
kitty
zsh
jq
fzf
fd # Find alternate
poppler # PDF Library
yazi # File manager
7zip # 7zip
tmux
dunst # Notification
stow
rofi # Menu
openssh
bat # Cat alternate
pavucontrol
pipewire
pipewire-pulse #replacce pulse audio
pipewire-media-session # Pulse media
bottom #alternate to HTOP
mpv
imv
lazygit
udiskie
whois
podman # Containered
kind # K8s cluster test require gcc-12
dnsutils
mtr
mupdf-gl
mupdf-tools
scrcpy # Android mirror
ripgrep
wget
k9s # K8s client
vultr-cli # Vultr cli
doctl # Digital Ocean cli
alsa-utils
gocloc
incus # Virtualization
virt-manager # only for spice client
skopeo # Incus required for container
umoci # Incus required for container
lunacy # Design alternate figma
bluez # Bluetooth driver
overskride # Bluetooth manager
eza #Replacement for ls
ncdu #du alternatif
#satty-bin # Screenshot editor wayland
unbound # DNS server
jellyfin-mpv-shim # Jellyfin Player MPV
socat # Eww websocket
btop # Taskmanager
)
fonts=(
ttf-hack-nerd
ttf-maple
noto-fonts
noto-fonts-variable-ar
noto-fonts-sc-vf
noto-fonts-emoji
)
nixdekstop=(
remmina
)
devops=(
helm
vault
terraform
ansible
python-pytz
)
for pre in ${prepare[@]}; do
install $pre
done
# for hyp in ${hyprland[@]}; do
# install $hyp
# done
for swr in ${software[@]}; do
install $swr
done
for font in ${fonts[@]}; do
install $font
done
for devopsi in ${devops}; do
install $devopsi
done
#for nix in ${nixdekstop[@]}; do
# spath=$(find /nix/store/ | grep $nix | grep "bin/$nix")
#
# echo $spath
#done
# Install Oh ZSH
if [ -d "~/.oh-my-zsh" ]; then
echo -e "Install OH-MY-ZSH"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
else
echo -e "$OK OH-MY-ZSH already installed"
fi
if [ -d "~/.tmux/plugins/tpm" ]; then
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
fi
if [ -z "$(which nix)" ]; then
echo -e "Install NIX"
sh <(curl -L https://nixos.org/nix/install) --no-daemon
else
echo -e "$OK NIX already installed"
fi
if [ -f "~/.nvm/nvm.sh" ]; then
echo -e "Install NVM"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
else
echo -e "$OK NVM already installed"
. $HOME/.nvm/nvm.sh
nvm use node
lnode=$(nvm ls-remote | tail -n 1 | awk '{ print $2 }' | sed -r "s/[\)|\s]//g" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")
[ -z "$lnode" ] && lnode=$(nvm ls-remote | tail -n 1 | awk '{ print $1 }' | sed -r "s/[\)|\s]//g" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")
cnode=$(nvm ls | grep default | head -1 | awk '{ print $5 }'| sed -r "s/[\)|\s]//g" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")
[ -z "$cnode" ] && cnode=$(nvm ls | grep default | head 0 | awk '{ print $3 }'| sed -r "s/[\)|\s]//g" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")
if [ "$lnode" == "$cnode" ]; then
echo -e "$OK Already latest nodejs"
else
echo -e "$NT Install latest nodejs version $lnode"
nvm install $lnode &>> $LOOG &
progress $!
echo -e "$NT Replace nodejs $cnode to $lnode"
nvm use node
nvm alias default node
nodeNow=$(nvm ls | grep default | head -1 | awk '{ print $5 }' | sed -r "s/[\)|\s]//g" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")
if [ "$nodeNow" = "$lnode" ]; then
echo -e "$OK nodejs version $lnode installed"
else
echo -e "$ER failed to install nodejs please check $LOOG"
fi
fi
fi
echo -e "$OK update directory"
stow -R hypr dunst kitty nixos nvim scripts tmux zsh waybar swaylock eww oh-my-posh pipewire newsboat qtile rofi
## NVIM Usage
if [ -z "$(pip list | grep neovim)" ]; then
echo -e "$AC Install Neovim for Python"
yay -S python-neovim --noconfirm
fi
if [ -z $(which neovim-node-host) ]; then
echo -e "$AC Install Neovim for Node"
npm i -g neovim
fi
if [ -z "$(yay -Q | grep ansible)" ]; then
echo "install python module required by ansible netbox inventory"
yay -S python-pytz python-pynetbox --noconfirm
fi