This repository has been archived by the owner on Mar 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_once_install-packages.sh
executable file
·188 lines (172 loc) · 3.6 KB
/
run_once_install-packages.sh
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
#!/usr/bin/env bash
. $(chezmoi source-path)/tools/changed_script_prompt
# Install only packages that are not installed yet. Based on: https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Install_packages_from_a_list
echo "Looking for packages that are not installed..."
packages=$(echo "acpi_call-dkms
alsa-utils
atool
atril
autorandr
betterlockscreen
bluetooth-autoconnect
bluez-utils
dash
dragon-drag-and-drop
dunst
elementary-icon-theme
elementary-xfce-icons
emacs
feh
ferdi-bin
firefox
freetype2-cleartype
fzf
gimp
gimp-plugin-resynthesizer
gpick
great-imd-evo
gtk-engine-murrine
htop
hunspell
hunspell-en_US
hunspell-pl
i3-gaps
kitty
libreoffice-still
libreoffice-still-pl
lightdm
lightdm-gtk-greeter
lxappearance-gtk3
lxqt-policykit
multilockscreen-git
ncdu
neovim
noto-fonts-emoji
npm
numlockx
pavucontrol
picom
playerctl
polybar
polybar-spotify-git
pulseaudio
pulseaudio-alsa
pulseaudio-modules-bt-git
pulsemixer
python-gobject
python-pip
python-pywal
python2
python2-pip
qt5-styleplugins
ripgrep
rofi-dmenu
rofi-pass
shellcheck
shfmt
siji-git
snapd
spectacle
splatmoji-git
spotify
spotifywm-git
subversion
teamocil
tex-gyre-fonts
thefuck
thunar
tmux
ttf-cascadia-code
ttf-fira-code
ttf-iosevka
ttf-jetbrains-mono
ttf-liberation
ttf-unifont
unzip
xcursor-openzone
xfce-theme-greybird
xorg-fonts-misc
xorg-server
xorg-xbacklight
xorg-xrdb
yarn
zathura
zathura-pdf-poppler
zip
zsh" | sort)
installed=$(yay -Qqe | sort)
not_installed=$(comm -13 <(echo "$installed") <(echo "$packages"))
not_installed_count=$(echo "$not_installed" | wc -l)
if [ "$not_installed_count" -eq 0 ]; then
echo "No new packages, exiting"
else
echo "Found $not_installed_count packages, installing"
yay -S $not_installed
fi
# Install bash-language-server
if ! command -v bash-language-server >/dev/null; then
sudo yarn global add bash-language-server
fi
# Install prettier
if ! command -v prettier >/dev/null; then
sudo yarn global add prettier
fi
# Enable lightdm service
systemctl_enable() {
if ! systemctl list-unit-files |
grep enabled |
grep "$1" >/dev/null; then
sudo systemctl enable --now "$1"
fi
}
systemctl_enable lightdm.service
# Remove 70-no-bitmaps.conf
if [ -e "/etc/fonts/conf.d/70-no-bitmaps.conf" ]; then
sudo rm "/etc/fonts/conf.d/70-no-bitmaps.conf"
fi
# Install fzf
if [ ! -d "$HOME/.fzf" ]; then
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf &&
~/.fzf/install
fi
# Install wpg
if ! command -v wpg >/dev/null; then
sudo pip3 install wpgtk
mkdir -p ~/.config/wpg/templates
mkdir -p ~/.themes
wpg-install.sh -ig
wpg -i ~/wallpapers/pixelart/mountain-sunshine.png ~/wpg_schemes/mountain-sunshine.json
wpg -s ~/wallpapers/pixelart/mountain-sunshine.png
fi
# Install vim-plug
if [ ! -f ~/.local/share/nvim/site/autoload/plug.vim ]; then
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
systemctl_enable() {
if ! systemctl list-unit-files |
grep enabled |
grep "$1" >/dev/null; then
sudo systemctl enable --now "$1"
fi
}
systemctl_enable_user() {
if ! systemctl list-unit-files |
grep enabled |
grep "$1" >/dev/null; then
systemctl enable --user --now "$1"
fi
}
# # Install snap
# systemctl_enable snapd.socket
# systemctl_enable apparmor.service
# # Create symlink to enable classic confinement
# [ ! -L /snap ] && sudo ln -s /var/lib/snapd/snap /snap
# # Install code
# if ! command -v code >/dev/null; then
# sudo snap install code --classic
# fi
# Enable bluetooth
systemctl_enable bluetooth.service
systemctl_enable bluetooth-autoconnect.service
systemctl_enable_user pulseaudio-bluetooth-autoconnect.service