-
Notifications
You must be signed in to change notification settings - Fork 0
/
300-install-personal-apps.sh
executable file
·230 lines (191 loc) · 6.15 KB
/
300-install-personal-apps.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
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
#!/bin/bash
: '
Install script for "non-essential" personal apps
@author T. de Waard
'
set -e
mkdir -p ~/git
source $(dirname "$0")/funcs.sh
#### Terminal ####
_install "kitty"
#### Browser ####
if [ ! -f /usr/bin/firefox-nightly ]; then
echo "Installing firefox-nightly..."
mkdir -p ~/ffnightly
cd ~/ffnightly
wget "https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US" -O firefox-nightly.tar.bz2
tar xvf firefox-nightly.tar.bz2
mv firefox firefox-nightly
sudo ln -s ~/ffnightly/firefox-nightly/firefox /usr/bin/firefox-nightly
mkdir -p ~/.local/share/applications
touch ~/.local/share/applications/nightly.desktop
tee ~/.local/share/applications/nightly.desktop <<EOF
[Desktop Entry]
Version=1.0
Name=Nightly
Comment=Browse the World Wide Web
Exec=/usr/bin/firefox-nightly %u
Terminal=false
Type=Application
Icon=/home/${whoami}/ffnightly/firefox-nightly/browser/chrome/icons/default/default128.png
Categories=Network;WebBrowser;
Actions=Default;Mozilla;ProfileManager;
[Desktop Action Default]
Name=Default Profile
Exec=/usr/bin/firefox-nightly –no-remote -P minefield-default
[Desktop Action Mozilla]
Name=Mozilla Profile
Exec=/usr/bin/firefox-nightly –no-remote -P minefield-mozilla
[Desktop Action ProfileManager]
Name=Profile Manager
Exec=/usr/bin/firefox-nightly –no-remote –profile-manager
EOF
echo "Successfully installed firefox-nightly!"
else
echo "Firefox-nightly already installed."
fi
_install "firefox"
#### Spotify ####
_installMany "yasm ffmpeg-compat-57 zenity libcurl-gnutls libcanberra appmenu-gtk-module spotify"
#### Vim Plugin Manager ####
if [ ! -f ~/.vim/autoload/plug.vim ]; then
echo "Installing Vim Plug plugin manager..."
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo "Successfully installed Vim Plug plugin manager..."
else
echo "Vim Plug already installed."
fi
#### ZSH ####
_installMany "zsh zsh-autosuggestions"
read -p "Install oh-my-zsh? [y/n]: " choice
if [[ "$choice" == "y" ]]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ""
chsh -s $(which zsh) $(whoami)
sudo chsh -s $(which zsh) root
touch ~/.zshenv ~/.zprofile
rm ~/.bashrc
else
echo "Skipped oh-my-zsh install."
fi
#### Fonts ####
read -p "Install all nerd fonts? [y/n]: " choice
if [[ "$choice" == "y" ]]; then
_gitInstall "ryanoasis" "nerd-fonts"
else
echo "Skipped nerd fonts install."
fi
#### RANGER ####
_installMany "imagemagick ranger python-pillow atool elinks ffmpegthumbnailer highlight libcaca lynx mediainfo odt2txt perl-image-exiftool poppler python-chardet"
# Ranger icons
_gitInstall "alexanderjeurissen" "ranger_devicons" "${HOME}/.config/ranger/plugins/ranger_devicons"
echo "default_linemode devicons" >> $HOME/.config/ranger/rc.conf
if [[ $(_isInstalled "i3-gaps") ]]; then
_install "feh"
else
_install "imv"
fi
#### VIM ####
_install "gvim"
#### DOOM Emacs ####
_install emacs ripgrep fd
_gitInstall "hlissner" "doom-emacs" "${HOME}/.emacs.d"
#### Mail ####
_installMany "birdtray"
#### Media ####
_install vlc
#### Syncthing #####
_installMany "syncthing"
read -p "Configure syncthing start on boot ? [y/n] : " syncstart
if [[ "$syncstart" == "y" ]]; then
_gitInstall "syncthing" "syncthing"
sudo cp ~/git/syncthing/etc/linux-systemd/system/[email protected] /etc/systemd/system
systemctl enable syncthing@$(whoami).service
systemctl start syncthing@$(whoami).service
fi
#### RSync ####
_install "rsync"
#### LaTeX related ####
read -p "Install LaTeX related packages? [y/n]: " latex
if [[ "$latex" == "y" ]]; then
_installMany "zathura zathura-pdf-mupdf texlive-most texlive-lang biber"
fi
#### PDFPC ####
_install "pdfpc"
#### MATLAB dependencies ####
_installMany "libselinux libxss libcanberra-gstreamer libcanberra-pulse"
#### VSCode ####
_install "visual-studio-code-bin"
#### Python IDE & Anaconda ####
_install "pycharm-professional"
if [[ ! -f /usr/bin/conda ]]; then
mkdir -p ~/git/anaconda
git clone https://aur.archlinux.org/anaconda.git ~/git/anaconda
cd ~/git/anaconda
makepkg -si
sudo ln -sf /opt/anaconda/bin/conda /usr/bin/conda
else
echo "Anaconda already installed."
fi
#### OpenJDK ####
_install "jdk-openjdk"
#### Graphics stuff ####
_installMany "blender gimp inkscape"
#### Random ####
_install "neofetch"
#### HWinfo ####
_install "hwinfo"
### Screenshots ####
if [[ $(_isInstalled "i3-gaps") ]]; then
_install "flameshot"
else
_installMany "grim slurp grimshot"
fi
#### Libreoffice ####
_install "libreoffice-fresh"
#### Notetaking/PDF signing #####
_install xournalpp-git
#### GitHub CLI ####
_install github-cli
#### GUI for hdmi outputs ####
if [[ $(_isInstalled "i3-gaps") ]]; then
_install "arandr"
else
_install "wdisplays"
fi
#### Overlay display bar ####
if [[ ! $(_isInstalled "i3-gaps") ]]; then
_install "wob"
fi
#### Blue light filter ####
if [[ $(_isInstalled "i3-gaps") ]]; then
_install "redshift"
read -p "Configure redshift systemd unit [y/n] ? : " redsh
if [[ "$redsh" == "y" ]]; then
sudo touch "/etc/systemd/system/redshift@$(whoami).service"
sudo tee "/etc/systemd/system/redshift@$(whoami).service" <<EOF
[Unit]
Description=Redshift adjusts the color temperature of your screen according to your surroundings
Documentation=http://jonls.dk/redshift/
After=graphical.target
[Service]
User=%i
Type=simple
Environment=DISPLAY=:1
ExecStart=/usr/bin/redshift -c /home/$(whoami)/.config/redshift/redshift.conf
TimeoutStopSec=5
[Install]
WantedBy=graphical.target
EOF
systemctl --user enable redshift
systemctl --user start redshift
fi
else
_install "gammastep"
fi
#### Mendeley ####
_install mendeley-reference-manager mendeleydesktop-bundled
#### LaTeX missing dependencies ####
_install perl-log-log4perl perl-file-homedir perl-log-dispatch perl-namespace-autoclean perl-specio perl-eval-closure perl-params-validationcompiler perl-yaml-tiny perl-unicode-linebreak
#### Some extra fonts ####
_installMany "ttf-ubuntu-font-family ttf-font-awesome ttf-cmu-bright ttf-cmu-concrete ttf-cmu-sans-serif ttf-cmu-serif"