configs/arch-setup/install.sh

522 lines
12 KiB
Bash
Raw Normal View History

2020-02-21 14:58:26 +01:00
#!/bin/bash
2020-02-28 22:33:35 +01:00
2020-10-26 19:50:44 +01:00
# TODO make this work
# NOTE ignore errors from missing "||". Try getting the line below to work
2020-10-26 19:50:44 +01:00
#set -euo pipefail
2020-10-12 07:16:00 +02:00
2020-02-28 22:39:50 +01:00
#change to home (does not show in terminal)
2020-10-12 07:16:37 +02:00
cd "$HOME"
2020-02-28 22:33:35 +01:00
in_xfce=0
in_i3gaps=0
2020-03-02 13:31:03 +01:00
2020-06-12 16:23:06 +02:00
cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16)
options=(1 "[DE] xfce4" off # any option can be set to default to "on"
2 "[WM] i3-gaps" off)
2020-06-12 16:23:06 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2020-06-12 16:23:06 +02:00
for choice in $choices
do
case $choice in
1)
in_xfce=1
2020-06-12 16:23:06 +02:00
;;
2)
in_i3gaps=1
2020-06-12 16:23:06 +02:00
;;
esac
done
2020-05-07 08:43:48 +02:00
in_firefox=0
2020-11-10 22:02:33 +01:00
in_chromium=0
in_netsurf=0
in_icecat=0
in_tor=0
2020-06-14 18:00:55 +02:00
cmd=(dialog --separate-output --checklist "Select browsers:" 22 76 16)
options=(1 "Firefox" on # any option can be set to default to "on"
2020-11-10 22:02:33 +01:00
2 "Chromium" off
3 "Netsurf" off
4 "Icecat" off
5 "Torbrowser" on)
2020-06-14 18:00:55 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2020-06-14 18:00:55 +02:00
for choice in $choices
do
case $choice in
1)
in_firefox=1
2020-06-14 18:00:55 +02:00
;;
2)
2020-11-10 22:02:33 +01:00
in_chromium=1
2020-06-14 18:00:55 +02:00
;;
3)
in_netsurf=1
2020-06-14 18:00:55 +02:00
;;
2020-11-10 22:02:33 +01:00
4)
in_icecat=1
2020-06-20 08:32:35 +02:00
;;
2020-11-10 22:02:33 +01:00
5)
in_tor=1
2020-06-21 22:16:27 +02:00
;;
2020-06-14 18:00:55 +02:00
esac
done
in_virtmanager=0
in_steam=0
in_lutris=0
in_blender=0
in_krita=0
in_youtubedl=0
in_discord=0
in_handbrake=0
in_gimp=0
in_audacity=0
in_mangohud=0
in_easystrokes=0
in_liferea=0
in_mirage=0
in_bettergram=0
in_waifu2x=0
2020-06-14 18:00:55 +02:00
cmd=(dialog --separate-output --checklist "Select other programs:" 22 76 16)
2020-06-12 16:23:06 +02:00
options=(1 "VirtManager" off # any option can be set to default to "on"
2 "Steam" off
3 "Lutris" off
4 "Blender" off
5 "Krita" off
6 "Youtube-dl" off
2020-06-14 18:00:55 +02:00
7 "Discord" on
2020-06-12 16:23:06 +02:00
8 "Handbrake" off
9 "Gimp" off
10 "Audacity" off
11 "MangoHud" off
12 "Easystroke" on
13 "Liferea" off
14 "Mirage" on
15 "Bettergram" on
16 "Waifu2x" off)
2020-06-12 16:23:06 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2020-06-12 16:23:06 +02:00
for choice in $choices
do
case $choice in
1)
in_virtmanager=1
2020-06-12 16:23:06 +02:00
;;
2)
in_steam=1
2020-06-12 16:23:06 +02:00
;;
3)
in_lutris=1
2020-06-12 16:23:06 +02:00
;;
4)
in_blender=1
2020-06-12 16:23:06 +02:00
;;
5)
in_krita=1
2020-06-12 16:23:06 +02:00
;;
6)
in_youtubedl=1
2020-06-12 16:23:06 +02:00
;;
7)
in_discord=1
2020-06-12 16:23:06 +02:00
;;
8)
in_handbrake=1
2020-06-12 16:23:06 +02:00
;;
9)
in_gimp=1
2020-06-12 16:23:06 +02:00
;;
10)
in_audacity=1
2020-06-12 16:23:06 +02:00
;;
11)
in_mangohud=1
2020-06-12 16:23:06 +02:00
;;
12)
in_easystrokes=1
2020-06-17 10:04:27 +02:00
;;
13)
in_liferea=1
2020-06-21 19:17:40 +02:00
;;
14)
in_mirage=1
2020-07-17 11:30:11 +02:00
;;
15)
in_bettergram=1
;;
16)
in_waifu2x=1
2020-07-30 17:01:12 +02:00
;;
2020-06-12 16:23:06 +02:00
esac
done
2020-08-29 13:52:27 +02:00
in_acpufreq=0
cmd=(dialog --separate-output --checklist "Performance and Battery life" 22 76 16)
options=(1 "auto-cpufreq" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
in_acpufreq=1
;;
esac
done
in_doomemacs=0
2020-09-09 21:01:58 +02:00
in_vscodium=0
2020-09-07 19:50:09 +02:00
cmd=(dialog --separate-output --checklist "Code editors" 22 76 16)
2020-09-09 21:01:58 +02:00
options=(1 "doom-emacs" off
2 "vscodium" off)
2020-09-07 19:50:09 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
in_doomemacs=1
2020-09-07 19:50:09 +02:00
;;
2020-09-09 21:01:58 +02:00
2)
in_vscodium=1
;;
2020-09-07 19:50:09 +02:00
esac
done
in_pkgstats=0
2020-07-17 21:14:06 +02:00
cmd=(dialog --separate-output --checklist "Report installed packages?" 22 76 16)
options=(1 "pkgstats" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2020-07-17 21:14:06 +02:00
for choice in $choices
do
case $choice in
1)
in_pkgstats=1
2020-07-17 21:14:06 +02:00
;;
esac
done
# Additional, only once installed, packages
in_optpkg=0
cmd=(dialog --separate-output --checklist "Report installed packages?" 22 76 16)
options=(1 "Additional packages" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1)
in_optpkg=1
;;
esac
done
#uninstalling unused packages
echo Uninstalling unused packages
sudo pacman -Rns evolution catfish geany vim keepass gnome-boxes sublime-text-dev atom adwaita-icon-theme arcolinux-i3wm-git arcolinux-tweak-tool-git arcolinux-welcome-app-git clonezilla evolution-data-server numix-circle-arc-icons-git numix-circle-icon-theme-git numix-gtk-theme-git numix-icon-theme-git oh-my-zsh-git pamac-aur qbittorrent vivaldi vlc code baka-mplayer tmux guvcview kdenlive xfce4-notifyd chromium freetype2 psensor transmission-qt pcloud-drive
echo Uninstalled unused packages
#update stuff
echo Updating packages
2020-11-04 21:46:14 +01:00
yay -Syyu
echo Updated packages
#pacman programs
2020-06-12 16:23:06 +02:00
echo Installing default pacman programs
2020-11-11 15:07:00 +01:00
sudo pacman -S --needed arandr libreoffice-fresh-de termite wget picom stress obs-studio python-pip hunspell hunspell-de hunspell-en_GB hyphen hyphen-de hyphen-en fish smartmontools thunderbird ffmpeg jre-openjdk thunar gtk-engine-murrine celluloid languagetool rofi nextcloud-client vnstat wireguard-tools cronie libnotify notification-daemon dunst rsync restic piper lightdm-gtk-greeter unzip ranger bandwhich cmus
2020-11-05 09:00:01 +01:00
# REVIEW replace transmission-qt with gtk version
sudo pacman -S --needed transmission-gtk
# REVIEW maybe find theme with less dependencies
sudo pacman -S --needed breeze
# NOTE Distro specific stuff
distro=$(cat /etc/*-release | grep "^ID=")
if [ "$distro" == "ID=arcolinux" ]; then
sudo pacman -S --needed slim archlinux-themes-slim
fi
if [ "$distro" == "ID=arch" ]; then
sudo pacman -S --needed arcolinux-slim arcolinux-slimlock-themes-git
fi
2020-06-12 16:23:06 +02:00
echo Installed official programs
2020-05-07 08:43:48 +02:00
2020-11-05 09:00:01 +01:00
# REVIEW Determine usefulness
# iperf3
# nload
# dmenu
# devtools
2020-10-31 10:30:26 +01:00
# REVIEW Patched neofetch version to remove Color codes
git clone https://github.com/RealStickman/neofetch
cd neofetch
2020-10-31 10:30:26 +01:00
sudo make install
cd ..
2020-11-04 21:53:55 +01:00
rm -rf neofetch
2020-10-31 10:30:26 +01:00
2020-05-07 08:43:48 +02:00
#AUR
2020-06-12 16:23:06 +02:00
echo Installing default AUR programs
yay -S --needed ttf-ms-fonts ttf-vista-fonts polybar nohang-git lightdm-webkit-theme-aether rig tmpmail-git lightdm-webkit2-theme-glorious sweet-theme-dark sweet-folders-icons-git wps-office
2020-11-04 21:57:56 +01:00
yay -S --needed freetype2-cleartype
2020-11-04 21:46:14 +01:00
yay -S --needed bitwarden
2020-11-04 21:37:31 +01:00
#yay -S --needed --noconfirm pcloud-drive
2020-06-12 16:23:06 +02:00
echo Installed AUR programs
2020-03-01 10:38:40 +01:00
2020-11-05 09:00:01 +01:00
# REVIEW Determine usefulness
# ttf-tahoma
# cpu-x
# nutty
# woeusb
# debtap
# gimp-plugin-registry
2020-11-09 20:10:29 +01:00
# multimc5
2020-11-05 09:00:01 +01:00
2020-02-29 16:00:06 +01:00
#install wine
2020-06-12 16:23:06 +02:00
echo Installing wine
2020-11-04 21:46:14 +01:00
pacman -S --needed wine-staging giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader
2020-06-12 16:23:06 +02:00
echo Installed wine
2020-02-29 13:18:14 +01:00
#python modules
2020-06-12 16:23:06 +02:00
echo Installing python modules
2020-07-30 18:32:45 +02:00
sudo pip3 install ffmpeg-normalize praw
2020-02-29 15:16:05 +01:00
echo Installed python modules
###################
#selected programs#
###################
echo Installing selected programs
#DEs & WMs
if [ $in_xfce -eq 1 ]; then
echo "Installing xfce"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm xfce4
else
echo "Skipping xfce"
fi
if [ $in_i3gaps -eq 1 ]; then
echo "Installing i3-gaps"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm i3-gaps
else
echo "Skipping i3-gaps"
fi
#browsers
if [ $in_firefox -eq 1 ]; then
echo "Installing Firefox"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm qemu firefox
else
echo "Skipping Firefox"
fi
2020-11-10 22:02:33 +01:00
if [ $in_chromium -eq 1 ]; then
echo "Installing Chromium"
sudo pacman -S --needed --noconfirm chromium
else
2020-11-10 22:02:33 +01:00
echo "Skipping Chromium"
fi
if [ $in_netsurf -eq 1 ]; then
echo "Installing Netsurf"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm netsurf
else
echo "Skipping Netsurf"
fi
if [ $in_icecat -eq 1 ]; then
echo "Installing Icecat"
2020-08-29 14:48:14 +02:00
sudo yay -S --needed --noconfirm icecat-bin
else
echo "Skipping Icecat"
fi
if [ $in_tor -eq 1 ]; then
echo "Installing Tor"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm torbrowser-launcher
else
echo "Skipping Tor"
fi
#other programs
if [ $in_virtmanager -eq 1 ]; then
echo "Installing VirtManager"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm qemu virt-manager
else
echo "Skipping VirtManager"
fi
if [ $in_steam -eq 1 ]; then
echo "Installing Steam"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm steam steam-native-runtime
else
echo "Skipping Steam"
fi
if [ $in_lutris -eq 1 ]; then
echo "Installing Lutris"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm lutris
else
echo "Skipping Lutris"
fi
if [ $in_blender -eq 1 ]; then
echo "Installing Blender"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm blender
else
echo "Skipping Blender"
fi
if [ $in_krita -eq 1 ]; then
echo "Installing Krita"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm krita
else
echo "Skipping Krita"
fi
if [ $in_youtubedl -eq 1 ]; then
echo "Installing Youtube-dl"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm youtube-dl
else
echo "Skipping Youtube-dl"
fi
if [ $in_discord -eq 1 ]; then
echo "Installing Discord"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm discord
else
echo "Skipping Discord"
fi
if [ $in_handbrake -eq 1 ]; then
echo "Installing Handbrake"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm handbrake
else
echo "Skipping Handbrake"
fi
if [ $in_gimp -eq 1 ]; then
echo "Installing Gimp"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm gimp
else
echo "Skipping Gimp"
fi
if [ $in_audacity -eq 1 ]; then
echo "Installing Audacity"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm audacity
else
echo "Skipping Audacity"
fi
if [ $in_mangohud -eq 1 ]; then
echo "Installing MangoHud"
git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git
./MangoHud/build.sh install
else
echo "Skipping MangoHud"
fi
if [ $in_easystrokes -eq 1 ]; then
echo "Installing Easystrokes"
2020-11-04 21:56:15 +01:00
yay -S --needed --noconfirm easystroke
else
echo "Skipping Easystrokes"
fi
if [ $in_liferea -eq 1 ]; then
echo "Installing Liferea"
2020-11-04 21:56:15 +01:00
yay -S --needed --noconfirm liferea
else
echo "Skipping Liferea"
fi
if [ $in_mirage -eq 1 ]; then
echo "Installing Mirage"
2020-11-04 21:56:15 +01:00
yay -S --needed --noconfirm matrix-mirage
else
echo "Skipping Mirage"
fi
if [ $in_bettergram -eq 1 ]; then
echo "Installing Bettergram"
2020-11-04 21:56:15 +01:00
yay -S --needed --noconfirm bettergram
else
echo "Skipping Bettergram"
fi
if [ $in_waifu2x -eq 1 ]; then
echo "Installing Waifu2x"
yay -S --needed --noconfirm waifu2x-ncnn-vulkan
else
echo "Skipping Waifu2x"
fi
2020-08-29 13:52:27 +02:00
#performance and battery life
if [ $in_acpufreq -eq 1 ]; then
echo "Installing auto-cpufreq"
2020-11-04 21:56:15 +01:00
yay -S --needed --noconfirm auto-cpufreq-git
2020-08-29 13:52:27 +02:00
sudo auto-cpufreq --install
sudo systemctl start auto-cpufreq
sudo systemctl enable auto-cpufreq
else
echo "Skipping auto-cpufreq"
fi
2020-09-07 19:50:09 +02:00
#doom-emacs
if [ $in_doomemacs -eq 1 ]; then
2020-09-07 19:50:09 +02:00
echo "Installing doom-emacs"
2020-10-16 17:36:59 +02:00
yay -S --needed --noconfirm git emacs ripgrep fd pandoc shellcheck python-pipenv python-isort python-pytest python-rednose pychecker texlive-core
2020-09-07 19:50:09 +02:00
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install
2020-09-07 19:58:16 +02:00
export PATH="$PATH":$HOME/.emacs.d/bin
2020-09-07 19:50:09 +02:00
else
echo "Skipping doom-emacs"
fi
2020-09-09 21:01:58 +02:00
if [ $in_vscodium -eq 1 ]; then
echo "Installing vscodium"
2020-09-10 15:30:18 +02:00
yay -S --needed --noconfirm vscodium-bin
2020-09-09 21:01:58 +02:00
else
echo "Skipping vscodium"
fi
#stats
if [ $in_pkgstats -eq 1 ]; then
echo "Installing pkgstats"
2020-08-29 14:45:08 +02:00
sudo pacman -S --needed --noconfirm pkgstats
else
echo "Skipping pkgstats"
fi
# additional packages
if [ $in_optpkg -eq 1 ]; then
echo "Installing additional packages"
yay -S --needed - < "$HOME/setup/pkglist.txt"
fi
2020-09-27 14:06:50 +02:00
#change shell
2020-09-27 14:07:43 +02:00
chsh -s /usr/bin/fish "$USER"
2020-09-27 14:06:50 +02:00
2020-09-02 10:51:45 +02:00
#enable vnstat
sudo systemctl enable vnstat
sudo systemctl start vnstat
2020-02-28 22:40:18 +01:00
#Changes to home folder automatically now, no need to be extra careful anymore.
2020-04-18 23:25:41 +02:00
git clone https://gitlab.com/RealStickman-arcolinux/config
2020-04-16 08:51:26 +02:00
echo Finished downloading config
2020-02-29 13:18:14 +01:00
#cleanup
2020-04-18 23:25:41 +02:00
rm -rf ~/setup
echo Removed setup files
2020-02-29 13:18:14 +01:00
#downloading config
2020-04-16 08:51:26 +02:00
echo Setting config
2020-06-15 20:50:25 +02:00
bash ~/config/install.sh
2020-07-17 21:14:06 +02:00
pkgstats
2020-07-30 11:00:22 +02:00
echo Finished everything