Compare commits
No commits in common. "636f59e6bae219966bc197f87566d00112d997e4" and "dd4d66baf33c734eb2b6f4a699aa32fe75994019" have entirely different histories.
636f59e6ba
...
dd4d66baf3
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
# TODO make this work
|
||||
# NOTE ignore errors from missing "||". Try getting the line below to work
|
||||
#set -euo pipefail
|
||||
|
||||
# function to keep sudo from timing out
|
||||
function func_dont_timeout {
|
||||
@ -18,13 +20,11 @@ fi
|
||||
# keep sudo active in background
|
||||
func_dont_timeout &
|
||||
|
||||
# get script directory
|
||||
scriptloc="$BASH_SOURCE"
|
||||
setupdir=$(dirname "$scriptloc")
|
||||
#setupdir=$(pwd)
|
||||
# get current directory
|
||||
setupdir=$(pwd)
|
||||
|
||||
#change to home directory
|
||||
#cd "$HOME"
|
||||
#change to home (does not show in terminal)
|
||||
cd "$HOME"
|
||||
|
||||
# check if multilib repo is enabled
|
||||
if ! pacman -Sl multilib &>/dev/null; then
|
||||
@ -40,13 +40,17 @@ sudo pacman -Syu
|
||||
echo Select packages to install
|
||||
|
||||
cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16)
|
||||
options=(100 "[WM] sway" off)
|
||||
options=(0 "[DE] xfce4" off # any option can be set to default to "on"
|
||||
100 "[WM] i3-gaps" off)
|
||||
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||
clear
|
||||
for choice in $choices; do
|
||||
case $choice in
|
||||
0)
|
||||
echo "xfce4" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
100)
|
||||
printf '%s\n' 'sway' 'swaylock' 'swayidle' 'swaybg' 'xorg-xwayland' >> "$setupdir/selectedpkgs.txt"
|
||||
echo "i3-gaps" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -60,13 +64,13 @@ clear
|
||||
for choice in $choices; do
|
||||
case $choice in
|
||||
0)
|
||||
echo "firefox" >> "$setupdir/selectedpkgs.txt"
|
||||
echo "firefox" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
10)
|
||||
echo "chromium" >> "$setupdir/selectedpkgs.txt"
|
||||
echo "chromium" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
20)
|
||||
echo "torbrowser-launcher" >> "$setupdir/selectedpkgs.txt"
|
||||
echo "torbrowser-launcher" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -95,16 +99,16 @@ clear
|
||||
for choice in $choices; do
|
||||
case $choice in
|
||||
0)
|
||||
printf '%s\n' 'qemu' 'virt-manager' 'ebtables' 'dnsmasq' >> "$setupdir/selectedpkgs.txt"
|
||||
printf '%s\n' 'qemu' 'virt-manager' 'ebtables' 'dnsmasq' >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
1)
|
||||
echo "vmware-workstation" >> "$setupdir/aurselectedpkgs.txt"
|
||||
echo "vmware-workstation" >>"$setupdir/aurselectedpkgs.txt"
|
||||
;;
|
||||
10)
|
||||
printf '%s\n' 'steam' 'steam-native-runtime' >> "$setupdir/selectedpkgs.txt"
|
||||
printf '%s\n' 'steam' 'steam-native-runtime' >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
11)
|
||||
echo "lutris" >> "$setupdir/selectedpkgs.txt"
|
||||
echo "lutris" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
12)
|
||||
echo "citra-qt-git" >>"$setupdir/aurselectedpkgs.txt"
|
||||
@ -113,10 +117,10 @@ for choice in $choices; do
|
||||
echo "minigalaxy" >>"$setupdir/aurselectedpkgs.txt"
|
||||
;;
|
||||
20)
|
||||
echo "krita" >> "$setupdir/selectedpkgs.txt"
|
||||
echo "krita" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
21)
|
||||
echo "gimp" >> "$setupdir/selectedpkgs.txt"
|
||||
echo "gimp" >>"$setupdir/selectedpkgs.txt"
|
||||
;;
|
||||
31)
|
||||
printf '%s\n' 'yt-dlp' 'yt-dlp-drop-in' >>"$setupdir/aurselectedpkgs.txt"
|
||||
@ -147,27 +151,6 @@ for choice in $choices; do
|
||||
;;
|
||||
80)
|
||||
echo "onedriver" >>"$setupdir/aurselectedpkgs.txt"
|
||||
esac
|
||||
done
|
||||
|
||||
in_acpufreq=0
|
||||
|
||||
cmd=(dialog --separate-output --checklist "Performance and Battery life" 22 76 16)
|
||||
options=(0 "auto-cpufreq" off
|
||||
1 "corectrl" off)
|
||||
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||
clear
|
||||
for choice in $choices
|
||||
do
|
||||
case $choice in
|
||||
0)
|
||||
in_acpufreq=1
|
||||
echo "auto-cpufreq-git" >> "$setupdir/aurselectedpkgs.txt"
|
||||
# TODO Handle rest of installation
|
||||
;;
|
||||
1)
|
||||
echo "corectrl" >> "$setupdir/aurselectedpkgs.txt"
|
||||
>>>>>>> e733d5d1 (Prepare for sway. Remove old comments)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -190,12 +173,31 @@ for choice in $choices; do
|
||||
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
|
||||
;;
|
||||
1)
|
||||
echo "vscodium-bin" >>"$setupdir/aurselectedpkgs.txt"
|
||||
;;
|
||||
10)
|
||||
in_podman=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16)
|
||||
options=(0 "Teams" off
|
||||
10 "OneNote" off)
|
||||
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||
clear
|
||||
for choice in $choices; do
|
||||
case $choice in
|
||||
0)
|
||||
echo "teams" >>"$setupdir/aurselectedpkgs.txt"
|
||||
;;
|
||||
10)
|
||||
echo "p3x-onenote" >>"$setupdir/aurselectedpkgs.txt"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
cmd=(dialog --separate-output --checklist "Report installed packages?" 22 76 16)
|
||||
options=(0 "pkgstats" off)
|
||||
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
|
||||
@ -208,7 +210,6 @@ for choice in $choices; do
|
||||
esac
|
||||
done
|
||||
|
||||
: '
|
||||
# Packages installed on different systems
|
||||
in_arco_pc=0
|
||||
in_arco_hp=0
|
||||
@ -228,7 +229,6 @@ for choice in $choices; do
|
||||
;;
|
||||
esac
|
||||
done
|
||||
'
|
||||
|
||||
rm "$setupdir/notfoundpackages.txt"
|
||||
|
||||
@ -246,7 +246,6 @@ echo Uninstalling unused packages
|
||||
while read package; do
|
||||
sudo pacman -Rns --noconfirm "$package"
|
||||
done <"$setupdir/packages/uninstall.txt"
|
||||
|
||||
echo Uninstalled unused packages
|
||||
|
||||
#pacman programs
|
||||
@ -266,7 +265,7 @@ done <"$setupdir/packages/winepkgs.txt"
|
||||
echo Installed wine
|
||||
|
||||
# install paru-bin
|
||||
if [[ ! $(pacman -Q paru) ]]; then
|
||||
if [[ ! $(pacman -Q | grep paru) ]]; then
|
||||
echo "Installing paru from the AUR"
|
||||
git clone https://aur.archlinux.org/paru-bin.git
|
||||
cd paru-bin
|
||||
@ -313,15 +312,6 @@ if [ -f "$setupdir/aurselectedpkgs.txt" ]; then
|
||||
paru -S --needed - <"$setupdir/aurselectedpkgs.txt" || true
|
||||
fi
|
||||
|
||||
#performance and battery life
|
||||
if [ $in_acpufreq -eq 1 ]; then
|
||||
echo "Installing auto-cpufreq"
|
||||
paru -S --needed auto-cpufreq-git
|
||||
sudo auto-cpufreq --install
|
||||
sudo systemctl start auto-cpufreq
|
||||
sudo systemctl enable auto-cpufreq
|
||||
fi
|
||||
|
||||
#devtools
|
||||
if [ $in_doomemacs -eq 1 ]; then
|
||||
echo "Installing doom-emacs"
|
||||
@ -331,6 +321,8 @@ if [ $in_doomemacs -eq 1 ]; then
|
||||
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
|
||||
~/.emacs.d/bin/doom install
|
||||
export PATH="$PATH":$HOME/.emacs.d/bin
|
||||
else
|
||||
echo "Skipping doom-emacs"
|
||||
fi
|
||||
|
||||
if [ $in_podman -eq 1 ]; then
|
||||
@ -340,6 +332,8 @@ if [ $in_podman -eq 1 ]; then
|
||||
sudo usermod --add-subuids 100000-165536 --add-subgids 100000-165536 "$USER"
|
||||
sudo groupadd -f podman
|
||||
sudo usermod -aG podman "$USER"
|
||||
else
|
||||
echo "Skipping podman"
|
||||
fi
|
||||
|
||||
# other system configs
|
||||
@ -361,41 +355,28 @@ fi
|
||||
##############################
|
||||
##### Configuration #####
|
||||
##############################
|
||||
echo Configuring packages
|
||||
|
||||
#change shell
|
||||
chsh -s /usr/bin/fish "$USER"
|
||||
|
||||
# setup autotrash
|
||||
autotrash -td 5 --install
|
||||
|
||||
#enable vnstat
|
||||
sudo systemctl enable --now vnstat
|
||||
|
||||
systemctl --user enable autotrash.timer
|
||||
|
||||
# enable lockscreen for systemd
|
||||
#sudo systemctl enable betterlockscreen@$USER
|
||||
sudo systemctl enable betterlockscreen@$USER
|
||||
|
||||
# enable firewall
|
||||
echo "Enabling Firewall"
|
||||
sudo systemctl enable --now firewalld
|
||||
# || true because firewalld doesn't work without a reboot
|
||||
sudo firewall-cmd --zone=public --permanent --remove-service=ssh || true
|
||||
sudo firewall-cmd --zone=public --permanent --remove-service=ssh
|
||||
|
||||
# enable greetd
|
||||
sudo systemctl enable greetd
|
||||
# enable lightdm
|
||||
sudo systemctl enable lightdm
|
||||
|
||||
# regenerate locale
|
||||
# Fixes rofi not launching
|
||||
#sudo locale-gen
|
||||
|
||||
: '
|
||||
if [[ $(pacman -Q | grep sway) ]]; then
|
||||
sudo systemctl enable --now seatd.service
|
||||
sudo gpasswd -a "$USER" seat 1>/dev/null
|
||||
fi
|
||||
'
|
||||
sudo locale-gen
|
||||
|
||||
# update fonts cache
|
||||
fc-cache -f
|
||||
|
@ -1,4 +1,5 @@
|
||||
autotrash
|
||||
betterlockscreen
|
||||
bitwarden
|
||||
btrfsmaintenance
|
||||
davfs2
|
||||
@ -25,3 +26,4 @@ tmpmail-git
|
||||
ttf-iosevka
|
||||
ttf-ms-fonts
|
||||
ttf-vista-fonts
|
||||
wps-office
|
||||
|
@ -62,6 +62,9 @@ libnotify
|
||||
libreoffice-fresh
|
||||
libreoffice-fresh-de
|
||||
libsecret
|
||||
lightdm
|
||||
lightdm-gtk-greeter
|
||||
lightdm-gtk-greeter-settings
|
||||
linux-zen
|
||||
linux-zen-headers
|
||||
lsp-plugins-lv2
|
||||
@ -103,6 +106,8 @@ qt5-imageformats
|
||||
rebuild-detector
|
||||
reflector
|
||||
restic
|
||||
rofi
|
||||
rofi-emoji
|
||||
rsync
|
||||
seahorse
|
||||
smartmontools
|
||||
@ -127,7 +132,6 @@ wget
|
||||
whois
|
||||
wireguard-tools
|
||||
wireplumber
|
||||
wofi
|
||||
xdg-user-dirs
|
||||
xdotool
|
||||
xf86-input-elographics
|
||||
@ -139,6 +143,7 @@ xf86-video-ati
|
||||
xf86-video-fbdev
|
||||
xf86-video-intel
|
||||
xf86-video-nouveau
|
||||
xfce4-power-manager
|
||||
xfsprogs
|
||||
xorg-xrdb
|
||||
xsel
|
||||
|
Loading…
Reference in New Issue
Block a user