configs/arch-setup/install.sh

764 lines
17 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
2021-01-29 16:53:04 +01:00
# get current directory
setupdir=$(pwd)
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
2022-03-20 12:23:09 +01:00
# check if multilib repo is enabled
2023-01-13 11:51:24 +01:00
if ! pacman -Sl multilib &>/dev/null; then
2022-03-20 12:23:09 +01:00
echo "Please enable the multilib repository first"
exit 1
fi
2022-03-20 11:27:27 +01:00
# fix install problems
2022-03-20 11:24:29 +01:00
sudo pacman -Syu
2022-03-20 13:23:16 +01:00
sudo pacman -S --needed python-pip
2022-03-20 11:24:29 +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)
2023-01-13 11:51:24 +01:00
options=(0 "[DE] xfce4" off # any option can be set to default to "on"
100 "[WM] i3-gaps" off)
2020-06-12 16:23:06 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2023-01-13 11:51:24 +01:00
for choice in $choices; do
2020-06-12 16:23:06 +02:00
case $choice in
2021-03-15 14:31:35 +01:00
0)
#in_xfce=1
2023-01-13 11:51:24 +01:00
echo "xfce4" >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
2021-03-15 14:31:35 +01:00
100)
#in_i3gaps=1
2023-01-13 11:51:24 +01:00
echo "i3-gaps" >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
esac
done
2020-05-07 08:43:48 +02:00
#in_firefox=0
#in_chromium=0
#in_tor=0
2020-06-14 18:00:55 +02:00
cmd=(dialog --separate-output --checklist "Select browsers:" 22 76 16)
2023-01-13 11:51:24 +01:00
options=(0 "Firefox" on # any option can be set to default to "on"
10 "Chromium" off
20 "Torbrowser" off)
2020-06-14 18:00:55 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2023-01-13 11:51:24 +01:00
for choice in $choices; do
2020-06-14 18:00:55 +02:00
case $choice in
2021-03-15 14:31:06 +01:00
0)
#in_firefox=1
2023-01-13 11:51:24 +01:00
echo "firefox" >>"$setupdir/selectedpkgs.txt"
2020-06-14 18:00:55 +02:00
;;
2021-03-15 14:31:06 +01:00
10)
#in_chromium=1
2023-01-13 11:51:24 +01:00
echo "chromium" >>"$setupdir/selectedpkgs.txt"
2020-06-14 18:00:55 +02:00
;;
2021-03-15 14:31:06 +01:00
20)
#in_tor=1
2023-01-13 11:51:24 +01:00
echo "torbrowser-launcher" >>"$setupdir/selectedpkgs.txt"
2020-06-21 22:16:27 +02:00
;;
2020-06-14 18:00:55 +02:00
esac
done
#in_virtmanager=0
#in_vmware15=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_liferea=0
#in_fractal=0
#in_bettergram=0
#in_waifu2x=0
#in_telegram=0
#in_element=0
2020-06-14 18:00:55 +02:00
cmd=(dialog --separate-output --checklist "Select other programs:" 22 76 16)
2023-01-13 11:51:24 +01:00
options=(0 "VirtManager" off # any option can be set to default to "on"
1 "VMWare Workstation" off
10 "Steam" off
11 "Lutris" off
12 "Citra" off
13 "Minigalaxy" off
20 "Krita" off
21 "Gimp" off
#30 "Youtube-dl" off
31 "YT-dlp" on
32 "Megatools" off
40 "Handbrake" off
41 "Audacity" off
42 "k3b" off
60 "Discord" on
61 "Element" on
62 "Telegram" on
70 "TestSSL" off
80 "Onedriver" off)
2020-06-12 16:23:06 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2023-01-13 11:51:24 +01:00
for choice in $choices; do
2020-06-12 16:23:06 +02:00
case $choice in
2021-03-15 14:30:36 +01:00
0)
#in_virtmanager=1
2023-01-13 11:51:24 +01:00
printf '%s\n' 'qemu' 'virt-manager' 'ebtables' 'dnsmasq' >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
2021-03-20 14:00:52 +01:00
1)
#in_vmware15=1
2023-01-13 11:51:24 +01:00
echo "vmware-workstation" >>"$setupdir/aurselectedpkgs.txt"
2021-03-20 14:00:52 +01:00
;;
2021-03-15 14:26:47 +01:00
10)
#in_steam=1
2023-01-13 11:51:24 +01:00
printf '%s\n' 'steam' 'steam-native-runtime' >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
2021-03-15 14:26:47 +01:00
11)
#in_lutris=1
2023-01-13 11:51:24 +01:00
echo "lutris" >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
2021-05-14 13:37:24 +02:00
12)
2023-01-13 11:51:24 +01:00
echo "citra-qt-git" >>"$setupdir/aurselectedpkgs.txt"
2021-05-14 13:37:24 +02:00
;;
2021-05-15 13:48:29 +02:00
13)
2023-01-13 11:51:24 +01:00
echo "minigalaxy" >>"$setupdir/aurselectedpkgs.txt"
2022-07-15 14:24:27 +02:00
;;
2021-03-15 14:26:47 +01:00
20)
#in_krita=1
2023-01-13 11:51:24 +01:00
echo "krita" >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
2021-03-15 14:26:47 +01:00
21)
#in_gimp=1
2023-01-13 11:51:24 +01:00
echo "gimp" >>"$setupdir/selectedpkgs.txt"
2021-03-15 14:26:47 +01:00
;;
30)
#in_youtubedl=1
2023-01-13 11:51:24 +01:00
echo "youtube-dl" >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
2021-10-18 17:36:46 +02:00
31)
2023-01-13 11:51:24 +01:00
printf '%s\n' 'yt-dlp' 'yt-dlp-drop-in' >>"$setupdir/aurselectedpkgs.txt"
2021-10-18 17:36:46 +02:00
;;
2021-12-29 09:05:24 +01:00
32)
2023-01-13 11:51:24 +01:00
echo "megatools-bin" >>"$setupdir/aurselectedpkgs.txt"
2021-12-29 09:05:24 +01:00
;;
2021-03-15 14:26:47 +01:00
40)
#in_handbrake=1
2023-01-13 11:51:24 +01:00
echo "handbrake" >>"$setupdir/selectedpkgs.txt"
2020-06-12 16:23:06 +02:00
;;
2021-03-15 14:26:47 +01:00
41)
# TODO
#in_audacity=1
#echo "audacity" >> "$setupdir/selectedpkgs.txt"
echo "The situation with audacity is unknown right now. Check for FOSS no-telemetry forks"
2020-06-12 16:23:06 +02:00
;;
42)
2023-01-13 11:51:24 +01:00
printf '%s\n' 'k3b' 'cdparanoia' 'cdrdao' 'cdrtools' 'dvd+rw-tools' 'emovix' 'transcode' 'vcdimager' >>"$setupdir/selectedpkgs.txt"
;;
2021-03-15 14:26:47 +01:00
60)
#in_discord=1
#echo "discord" >> "$setupdir/selectedpkgs.txt"
2023-01-13 11:51:24 +01:00
echo "discord_arch_electron" >>"$setupdir/aurselectedpkgs.txt"
;;
2021-03-15 14:26:47 +01:00
61)
#in_element=1
2023-01-13 11:51:24 +01:00
echo "element-desktop" >>"$setupdir/selectedpkgs.txt"
2020-07-30 17:01:12 +02:00
;;
2021-03-15 14:26:47 +01:00
62)
#in_telegram=1
2023-01-13 11:51:24 +01:00
echo "telegram-desktop" >>"$setupdir/selectedpkgs.txt"
;;
2022-01-04 13:41:47 +01:00
70)
2023-01-13 11:51:24 +01:00
echo "testssl.sh" >>"$setupdir/selectedpkgs.txt"
2022-01-04 13:41:47 +01:00
;;
2022-10-06 13:56:40 +02:00
80)
2023-01-13 11:51:24 +01:00
echo "onedriver" >>"$setupdir/aurselectedpkgs.txt"
2022-10-06 13:56:40 +02:00
;;
2020-06-12 16:23:06 +02:00
esac
done
2022-09-30 09:41:06 +02:00
: '
2020-08-29 13:52:27 +02:00
in_acpufreq=0
cmd=(dialog --separate-output --checklist "Performance and Battery life" 22 76 16)
2021-03-15 14:32:13 +01:00
options=(0 "auto-cpufreq" off)
2020-08-29 13:52:27 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
2021-03-15 14:32:13 +01:00
0)
2020-08-29 13:52:27 +02:00
in_acpufreq=1
2021-01-29 16:53:04 +01:00
echo "auto-cpufreq-git" >> "$setupdir/aurselectedpkgs.txt"
# TODO Handle rest of installation
2020-08-29 13:52:27 +02:00
;;
2021-08-22 16:20:06 +02:00
1)
#in_corectrl=1
echo "corectrl" >> "$setupdir/aurselectedpkgs.txt"
;;
2020-08-29 13:52:27 +02:00
esac
done
2022-09-30 09:41:06 +02:00
'
2020-08-29 13:52:27 +02:00
in_doomemacs=0
#in_vscodium=0
2021-03-31 15:21:23 +02:00
in_podman=0
2020-09-07 19:50:09 +02:00
2021-03-31 15:21:23 +02:00
cmd=(dialog --separate-output --checklist "Devtools" 22 76 16)
2021-03-15 14:32:50 +01:00
options=(0 "doom-emacs" off
2023-01-13 11:51:24 +01:00
1 "vscodium" off
10 "Podman" off)
2020-09-07 19:50:09 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2023-01-13 11:51:24 +01:00
for choice in $choices; do
2020-09-07 19:50:09 +02:00
case $choice in
2021-03-15 14:32:50 +01:00
0)
in_doomemacs=1
# TODO sort pacman and AUR packages
2022-01-20 09:01:00 +01:00
# pychecker not in AUR anymore
2023-01-13 11:51:24 +01:00
printf '%s\n' 'git' 'emacs' 'ripgrep' 'fd' 'pandoc' 'shellcheck' 'python-pipenv' 'python-isort' 'python-pytest' 'python-rednose' 'pychecker' 'texlive-core' 'pyright' 'python-grip' 'prettier' 'shfmt' >>"$setupdir/aurselectedpkgs.txt"
# TODO handle rest of installation
2020-09-07 19:50:09 +02:00
;;
2021-03-15 14:32:50 +01:00
1)
#in_vscodium=1
2023-01-13 11:51:24 +01:00
echo "vscodium-bin" >>"$setupdir/aurselectedpkgs.txt"
2020-09-09 21:01:58 +02:00
;;
2021-03-31 15:21:23 +02:00
10)
in_podman=1
;;
2020-09-07 19:50:09 +02:00
esac
done
#in_teams=0
#in_slack=0
2020-11-13 07:58:44 +01:00
2020-11-13 08:02:58 +01:00
cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16)
2021-03-15 14:34:10 +01:00
options=(0 "Teams" off
2023-01-13 11:51:24 +01:00
1 "Slack" off
10 "OneNote" off)
2020-11-13 07:58:44 +01:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2023-01-13 11:51:24 +01:00
for choice in $choices; do
2020-11-13 07:58:44 +01:00
case $choice in
2021-03-15 14:34:10 +01:00
0)
#in_teams=1
2023-01-13 11:51:24 +01:00
echo "teams" >>"$setupdir/aurselectedpkgs.txt"
2020-11-13 07:58:44 +01:00
;;
2021-03-15 14:34:10 +01:00
1)
#in_slack=1
#echo "slack-desktop" >> "$setupdir/aurselectedpkgs.txt"
2023-01-13 11:51:24 +01:00
echo "slack-electron" >>"$setupdir/aurselectedpkgs.txt"
2020-11-13 07:58:44 +01:00
;;
2021-03-15 14:34:10 +01:00
10)
2023-01-13 11:51:24 +01:00
echo "p3x-onenote" >>"$setupdir/aurselectedpkgs.txt"
2021-03-15 14:34:10 +01:00
;;
2020-11-13 07:58:44 +01: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)
2021-03-15 14:34:30 +01:00
options=(0 "pkgstats" off)
2020-07-17 21:14:06 +02:00
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2023-01-13 11:51:24 +01:00
for choice in $choices; do
2020-07-17 21:14:06 +02:00
case $choice in
2021-03-15 14:34:30 +01:00
0)
#in_pkgstats=1
2023-01-13 11:51:24 +01:00
echo "pkgstats" >>"$setupdir/selectedpkgs.txt"
2020-07-17 21:14:06 +02:00
;;
esac
done
# Packages installed on different systems
in_arco_pc=0
in_arco_hp=0
cmd=(dialog --separate-output --checklist "Install system specific packages?" 22 76 16)
options=(1 "Arco PC" off
2023-01-13 11:51:24 +01:00
2 "Arco HP" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
2023-01-13 11:51:24 +01:00
for choice in $choices; do
case $choice in
1)
in_arco_pc=1
;;
2)
in_arco_hp=1
;;
esac
done
#uninstalling unused packages
echo Uninstalling unused packages
2023-01-13 11:51:24 +01:00
sudo pacman -Rns - <"$setupdir/packages/uninstall.txt"
echo Uninstalled unused packages
2021-03-09 11:40:48 +01:00
# find all repos
sudo pacman -Sy
#update stuff
echo Updating packages
2021-03-09 11:40:48 +01:00
sudo pacman -Syu
echo Updated packages
#pacman programs
2020-06-12 16:23:06 +02:00
echo Installing default pacman programs
2023-01-13 11:51:24 +01:00
sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt"
2020-06-12 16:23:06 +02:00
echo Installed official programs
2020-05-07 08:43:48 +02:00
2021-01-09 08:54:40 +01:00
# pip
#echo Installing python programs
#pip install --user autotrash
#echo Installed python programs
2021-01-09 08:54:40 +01:00
2020-10-31 10:30:26 +01:00
# REVIEW Patched neofetch version to remove Color codes
2023-01-13 11:51:17 +01:00
#git clone https://github.com/RealStickman/neofetch
#cd neofetch
#sudo make install
#cd ..
#rm -rf neofetch
2020-10-31 10:30:26 +01:00
2021-03-15 15:02:17 +01:00
# install paru-bin with yay, or download paru from github
2020-12-19 21:45:48 +01:00
if [[ $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then
2020-12-19 21:43:09 +01:00
echo "Installing paru"
2020-12-19 21:49:27 +01:00
yay -S paru-bin
2021-03-15 15:02:17 +01:00
elif [[ ! $(pacman -Q | grep yay) ]] && [[ ! $(pacman -Q | grep paru) ]]; then
2021-03-09 11:39:24 +01:00
echo "Installing paru from git"
2022-03-25 21:45:55 +01:00
git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin
2021-03-09 11:39:24 +01:00
makepkg -si
2021-03-09 11:45:34 +01:00
cd ..
2021-03-09 11:39:24 +01:00
fi
# audio
echo Installing audio programs
2023-01-13 11:51:24 +01:00
paru -S --needed - <"$setupdir/packages/audiopkgs.txt"
echo Installed audio programs
2020-05-07 08:43:48 +02:00
#AUR
2020-06-12 16:23:06 +02:00
echo Installing default AUR programs
2023-01-13 11:51:24 +01:00
paru -S --needed - <"$setupdir/packages/aurpkgs.txt"
2020-06-12 16:23:06 +02:00
echo Installed AUR programs
2020-03-01 10:38:40 +01:00
2021-02-17 20:45:31 +01:00
# theming
echo Installing themes and icons
2023-01-13 11:51:24 +01:00
paru -S --needed - <"$setupdir/packages/theme-packages.txt"
2021-02-17 20:45:31 +01:00
echo Installed themes and icons
2020-02-29 16:00:06 +01:00
#install wine
2020-06-12 16:23:06 +02:00
echo Installing wine
2023-01-13 11:51:24 +01:00
sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt"
2020-06-12 16:23:06 +02:00
echo Installed wine
2020-02-29 13:18:14 +01:00
###################
#selected programs#
###################
echo Installing selected programs
# install selected packages
echo Installing from official repository
2023-01-13 11:51:24 +01:00
sudo pacman -S --needed - <"$setupdir/selectedpkgs.txt"
# install selected aur packages
echo Installing from AUR
2023-01-13 11:51:24 +01:00
paru -S --needed - <"$setupdir/aurselectedpkgs.txt"
: '
2021-03-20 14:00:52 +01:00
if [ $in_vmware15 -eq 1 ]; then
echo "Installing VMWare Workstation 15"
paru -S --needed vmware-workstation15
else
echo "Skipping VMWare Workstation 15"
fi
'
2021-03-20 14:00:52 +01:00
#DEs & WMs
: '
if [ $in_xfce -eq 1 ]; then
echo "Installing xfce"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed xfce4
else
echo "Skipping xfce"
fi
'
: '
if [ $in_i3gaps -eq 1 ]; then
echo "Installing i3-gaps"
2020-11-14 13:49:32 +01:00
sudo pacman -S --needed i3-gaps
else
echo "Skipping i3-gaps"
fi
'
: '
#browsers
if [ $in_firefox -eq 1 ]; then
echo "Installing Firefox"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed firefox
else
echo "Skipping Firefox"
fi
'
: '
2020-11-10 22:02:33 +01:00
if [ $in_chromium -eq 1 ]; then
echo "Installing Chromium"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed chromium
else
2020-11-10 22:02:33 +01:00
echo "Skipping Chromium"
fi
'
: '
if [ $in_netsurf -eq 1 ]; then
echo "Installing Netsurf"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed netsurf
else
echo "Skipping Netsurf"
fi
'
: '
if [ $in_icecat -eq 1 ]; then
echo "Installing Icecat"
2020-12-19 21:32:22 +01:00
paru -S --needed icecat-bin
else
echo "Skipping Icecat"
fi
'
: '
if [ $in_tor -eq 1 ]; then
echo "Installing Tor"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed torbrowser-launcher
else
echo "Skipping Tor"
fi
'
#other programs
: '
if [ $in_virtmanager -eq 1 ]; then
echo "Installing VirtManager"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed qemu virt-manager
else
echo "Skipping VirtManager"
fi
'
: '
if [ $in_steam -eq 1 ]; then
echo "Installing Steam"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed steam steam-native-runtime
else
echo "Skipping Steam"
fi
'
: '
if [ $in_lutris -eq 1 ]; then
echo "Installing Lutris"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed lutris
else
echo "Skipping Lutris"
fi
'
: '
if [ $in_blender -eq 1 ]; then
echo "Installing Blender"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed blender
else
echo "Skipping Blender"
fi
'
: '
if [ $in_krita -eq 1 ]; then
echo "Installing Krita"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed krita
else
echo "Skipping Krita"
fi
'
: '
if [ $in_youtubedl -eq 1 ]; then
echo "Installing Youtube-dl"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed youtube-dl
else
echo "Skipping Youtube-dl"
fi
'
: '
if [ $in_discord -eq 1 ]; then
echo "Installing Discord"
#sudo pacman -S --needed discord
paru -S discord_arch_electron
else
echo "Skipping Discord"
fi
'
: '
if [ $in_handbrake -eq 1 ]; then
echo "Installing Handbrake"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed handbrake
else
echo "Skipping Handbrake"
fi
'
: '
if [ $in_gimp -eq 1 ]; then
echo "Installing Gimp"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed gimp
else
echo "Skipping Gimp"
fi
'
: '
if [ $in_audacity -eq 1 ]; then
echo "Installing Audacity"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed 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_liferea -eq 1 ]; then
echo "Installing Liferea"
2020-12-19 21:32:22 +01:00
paru -S --needed liferea
else
echo "Skipping Liferea"
fi
'
: '
2020-11-15 10:56:25 +01:00
if [ $in_fractal -eq 1 ]; then
echo "Installing Fractal"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed fractal
else
2020-11-15 10:56:25 +01:00
echo "Skipping Fractal"
fi
'
: '
if [ $in_bettergram -eq 1 ]; then
echo "Installing Bettergram"
2020-12-19 21:32:22 +01:00
paru -S --needed bettergram
else
echo "Skipping Bettergram"
fi
'
: '
if [ $in_waifu2x -eq 1 ]; then
echo "Installing Waifu2x"
2020-12-19 21:32:22 +01:00
paru -S --needed waifu2x-ncnn-vulkan
else
echo "Skipping Waifu2x"
fi
'
: '
if [ $in_telegram -eq 1 ]; then
echo "Installing Telegram"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed telegram-desktop
else
echo "Skipping Telegram"
fi
'
: '
2021-01-04 12:56:30 +01:00
if [ $in_element -eq 1 ]; then
2020-12-31 11:07:55 +01:00
echo "Installing Element"
sudo pacman -S --needed element-desktop
else
echo "Skipping Element"
fi
'
2020-12-31 11:07:55 +01:00
2022-09-30 09:41:06 +02:00
: '
2020-08-29 13:52:27 +02:00
#performance and battery life
if [ $in_acpufreq -eq 1 ]; then
echo "Installing auto-cpufreq"
2020-12-19 21:32:22 +01:00
paru -S --needed 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
2022-09-30 09:41:06 +02:00
'
2020-08-29 13:52:27 +02:00
2021-03-31 15:21:23 +02:00
#devtools
if [ $in_doomemacs -eq 1 ]; then
2020-09-07 19:50:09 +02:00
echo "Installing doom-emacs"
2022-09-12 15:57:45 +02:00
paru -S --needed git emacs ripgrep fd pandoc shellcheck python-pipenv python-isort python-pytest python-rednose pychecker texlive-core powershell-bin python-black
2022-05-12 15:35:54 +02:00
pip install grip
2022-05-22 12:57:52 +02:00
npm i bash-language-server
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-12-19 21:32:22 +01:00
paru -S --needed vscodium-bin
2020-09-09 21:01:58 +02:00
else
echo "Skipping vscodium"
fi
'
2020-09-09 21:01:58 +02:00
2021-03-31 15:21:23 +02:00
if [ $in_podman -eq 1 ]; then
echo "Installing podman"
sudo pacman -S --needed podman podman-dnsname fuse-overlayfs buildah
2021-03-31 15:21:23 +02:00
sudo touch /etc/subuid /etc/subgid
sudo usermod --add-subuids 100000-165536 --add-subgids 100000-165536 "$USER"
sudo groupadd -f podman
sudo usermod -aG podman "$USER"
2021-03-31 15:21:23 +02:00
else
echo "Skipping podman"
fi
: '
2020-11-13 08:02:58 +01:00
#other social stuff
2020-11-13 07:58:44 +01:00
if [ $in_teams -eq 1 ]; then
echo "Installing teams"
2020-12-19 21:32:22 +01:00
paru -S --needed teams
2020-11-13 07:58:44 +01:00
else
echo "Skipping teams"
fi
'
2020-11-13 07:58:44 +01:00
: '
2020-11-13 07:58:44 +01:00
if [ $in_slack -eq 1 ]; then
echo "Installing slack"
2021-02-22 19:47:21 +01:00
#paru -S --needed slack-desktop
paru -s --needed slack-electron
2020-11-13 07:58:44 +01:00
else
echo "Skipping slack"
fi
'
2020-11-13 07:58:44 +01:00
: '
#stats
if [ $in_pkgstats -eq 1 ]; then
echo "Installing pkgstats"
2020-12-19 21:32:22 +01:00
sudo pacman -S --needed pkgstats
else
echo "Skipping pkgstats"
fi
'
# other system configs
# arco pc
if [ $in_arco_pc -eq 1 ]; then
echo "Installing arco pc packages"
2023-01-13 11:51:24 +01:00
paru -S --needed - <"$setupdir/packages/lupusregina-packages.txt"
fi
# arco hp
if [ $in_arco_hp -eq 1 ]; then
2021-03-01 09:42:38 +01:00
echo "Installing arch hp packages"
2023-01-13 11:51:24 +01:00
paru -S --needed - <"$setupdir/packages/arch-hp-packages.txt"
fi
2023-02-24 15:00:55 +01:00
# install nix
curl -sSf -L https://install.determinate.systems/nix | sh -s -- install
##############################
##### Configuration #####
##############################
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
# setup autotrash
autotrash -d 5 --install
systemctl --user start autotrash
systemctl --user enable autotrash.timer
2021-03-09 08:53:57 +01:00
# enable lockscreen for systemd
sudo systemctl enable betterlockscreen@$USER
2020-11-17 15:34:39 +01:00
# enable firewall
echo "Enabling Firewall"
2021-11-06 14:06:55 +01:00
#sudo ufw enable
#sudo systemctl enable ufw
#sudo systemctl start ufw
sudo systemctl enable --now firewalld
2021-11-06 14:08:16 +01:00
sudo firewall-cmd --zone=public --permanent --remove-service=ssh
2020-11-17 15:34:39 +01:00
2021-01-23 19:54:05 +01:00
# enable lightdm
sudo systemctl enable lightdm
2021-03-17 15:54:09 +01:00
# regenerate locale
# Fixes rofi not launching
sudo locale-gen
2020-12-20 21:05:09 +01:00
# update fonts cache
fc-cache -f
2021-01-04 17:24:43 +01:00
# download grub theme
git clone https://github.com/xenlism/Grub-themes.git
2021-03-04 13:55:36 +01:00
cd "Grub-themes/xenlism-grub-arch-1080p/"
sudo bash install.sh
# go back
cd ../../
2021-01-04 17:24:43 +01:00
2020-02-28 22:40:18 +01:00
#Changes to home folder automatically now, no need to be extra careful anymore.
2021-01-29 16:46:23 +01:00
git clone https://gitlab.com/RealStickman-arch/config
2020-04-16 08:51:26 +02:00
echo Finished downloading config
2020-02-29 13:18:14 +01:00
2020-11-17 21:09:57 +01:00
# Download git repos
2020-12-10 08:20:09 +01:00
bash ~/config/scripts/sc-git-pull
2020-11-17 21:09:57 +01:00
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
2021-01-29 19:58:32 +01:00
2023-01-13 11:51:24 +01:00
if [[ $(pacman -Q pkgstats 2>/dev/null >/dev/null) ]]; then
2021-01-29 19:58:32 +01:00
pkgstats
fi
2020-07-30 11:00:22 +02:00
echo Finished everything
2020-11-17 21:09:57 +01:00
exit 0