Autoformatting

This commit is contained in:
RealStickman 2023-01-13 11:51:24 +01:00
parent bf77bce184
commit fb04316994

View File

@ -11,7 +11,7 @@ setupdir=$(pwd)
cd "$HOME" cd "$HOME"
# check if multilib repo is enabled # check if multilib repo is enabled
if ! pacman -Sl multilib &> /dev/null; then if ! pacman -Sl multilib &>/dev/null; then
echo "Please enable the multilib repository first" echo "Please enable the multilib repository first"
exit 1 exit 1
fi fi
@ -24,20 +24,19 @@ sudo pacman -S --needed python-pip
#in_i3gaps=0 #in_i3gaps=0
cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16) cmd=(dialog --separate-output --checklist "Select Desktop environment/Window manager:" 22 76 16)
options=(0 "[DE] xfce4" off # any option can be set to default to "on" options=(0 "[DE] xfce4" off # any option can be set to default to "on"
100 "[WM] i3-gaps" off) 100 "[WM] i3-gaps" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
for choice in $choices for choice in $choices; do
do
case $choice in case $choice in
0) 0)
#in_xfce=1 #in_xfce=1
echo "xfce4" >> "$setupdir/selectedpkgs.txt" echo "xfce4" >>"$setupdir/selectedpkgs.txt"
;; ;;
100) 100)
#in_i3gaps=1 #in_i3gaps=1
echo "i3-gaps" >> "$setupdir/selectedpkgs.txt" echo "i3-gaps" >>"$setupdir/selectedpkgs.txt"
;; ;;
esac esac
done done
@ -47,25 +46,24 @@ done
#in_tor=0 #in_tor=0
cmd=(dialog --separate-output --checklist "Select browsers:" 22 76 16) cmd=(dialog --separate-output --checklist "Select browsers:" 22 76 16)
options=(0 "Firefox" on # any option can be set to default to "on" options=(0 "Firefox" on # any option can be set to default to "on"
10 "Chromium" off 10 "Chromium" off
20 "Torbrowser" off) 20 "Torbrowser" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
for choice in $choices for choice in $choices; do
do
case $choice in case $choice in
0) 0)
#in_firefox=1 #in_firefox=1
echo "firefox" >> "$setupdir/selectedpkgs.txt" echo "firefox" >>"$setupdir/selectedpkgs.txt"
;; ;;
10) 10)
#in_chromium=1 #in_chromium=1
echo "chromium" >> "$setupdir/selectedpkgs.txt" echo "chromium" >>"$setupdir/selectedpkgs.txt"
;; ;;
20) 20)
#in_tor=1 #in_tor=1
echo "torbrowser-launcher" >> "$setupdir/selectedpkgs.txt" echo "torbrowser-launcher" >>"$setupdir/selectedpkgs.txt"
;; ;;
esac esac
done done
@ -90,73 +88,72 @@ done
#in_element=0 #in_element=0
cmd=(dialog --separate-output --checklist "Select other programs:" 22 76 16) cmd=(dialog --separate-output --checklist "Select other programs:" 22 76 16)
options=(0 "VirtManager" off # any option can be set to default to "on" options=(0 "VirtManager" off # any option can be set to default to "on"
1 "VMWare Workstation" off 1 "VMWare Workstation" off
10 "Steam" off 10 "Steam" off
11 "Lutris" off 11 "Lutris" off
12 "Citra" off 12 "Citra" off
13 "Minigalaxy" off 13 "Minigalaxy" off
20 "Krita" off 20 "Krita" off
21 "Gimp" off 21 "Gimp" off
#30 "Youtube-dl" off #30 "Youtube-dl" off
31 "YT-dlp" on 31 "YT-dlp" on
32 "Megatools" off 32 "Megatools" off
40 "Handbrake" off 40 "Handbrake" off
41 "Audacity" off 41 "Audacity" off
42 "k3b" off 42 "k3b" off
60 "Discord" on 60 "Discord" on
61 "Element" on 61 "Element" on
62 "Telegram" on 62 "Telegram" on
70 "TestSSL" off 70 "TestSSL" off
80 "Onedriver" off) 80 "Onedriver" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
for choice in $choices for choice in $choices; do
do
case $choice in case $choice in
0) 0)
#in_virtmanager=1 #in_virtmanager=1
printf '%s\n' 'qemu' 'virt-manager' 'ebtables' 'dnsmasq' >> "$setupdir/selectedpkgs.txt" printf '%s\n' 'qemu' 'virt-manager' 'ebtables' 'dnsmasq' >>"$setupdir/selectedpkgs.txt"
;; ;;
1) 1)
#in_vmware15=1 #in_vmware15=1
echo "vmware-workstation" >> "$setupdir/aurselectedpkgs.txt" echo "vmware-workstation" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
10) 10)
#in_steam=1 #in_steam=1
printf '%s\n' 'steam' 'steam-native-runtime' >> "$setupdir/selectedpkgs.txt" printf '%s\n' 'steam' 'steam-native-runtime' >>"$setupdir/selectedpkgs.txt"
;; ;;
11) 11)
#in_lutris=1 #in_lutris=1
echo "lutris" >> "$setupdir/selectedpkgs.txt" echo "lutris" >>"$setupdir/selectedpkgs.txt"
;; ;;
12) 12)
echo "citra-qt-git" >> "$setupdir/aurselectedpkgs.txt" echo "citra-qt-git" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
13) 13)
echo "minigalaxy" >> "$setupdir/aurselectedpkgs.txt" echo "minigalaxy" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
20) 20)
#in_krita=1 #in_krita=1
echo "krita" >> "$setupdir/selectedpkgs.txt" echo "krita" >>"$setupdir/selectedpkgs.txt"
;; ;;
21) 21)
#in_gimp=1 #in_gimp=1
echo "gimp" >> "$setupdir/selectedpkgs.txt" echo "gimp" >>"$setupdir/selectedpkgs.txt"
;; ;;
30) 30)
#in_youtubedl=1 #in_youtubedl=1
echo "youtube-dl" >> "$setupdir/selectedpkgs.txt" echo "youtube-dl" >>"$setupdir/selectedpkgs.txt"
;; ;;
31) 31)
printf '%s\n' 'yt-dlp' 'yt-dlp-drop-in' >> "$setupdir/aurselectedpkgs.txt" printf '%s\n' 'yt-dlp' 'yt-dlp-drop-in' >>"$setupdir/aurselectedpkgs.txt"
;; ;;
32) 32)
echo "megatools-bin" >> "$setupdir/aurselectedpkgs.txt" echo "megatools-bin" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
40) 40)
#in_handbrake=1 #in_handbrake=1
echo "handbrake" >> "$setupdir/selectedpkgs.txt" echo "handbrake" >>"$setupdir/selectedpkgs.txt"
;; ;;
41) 41)
# TODO # TODO
@ -165,26 +162,26 @@ do
echo "The situation with audacity is unknown right now. Check for FOSS no-telemetry forks" echo "The situation with audacity is unknown right now. Check for FOSS no-telemetry forks"
;; ;;
42) 42)
printf '%s\n' 'k3b' 'cdparanoia' 'cdrdao' 'cdrtools' 'dvd+rw-tools' 'emovix' 'transcode' 'vcdimager' >> "$setupdir/selectedpkgs.txt" printf '%s\n' 'k3b' 'cdparanoia' 'cdrdao' 'cdrtools' 'dvd+rw-tools' 'emovix' 'transcode' 'vcdimager' >>"$setupdir/selectedpkgs.txt"
;; ;;
60) 60)
#in_discord=1 #in_discord=1
#echo "discord" >> "$setupdir/selectedpkgs.txt" #echo "discord" >> "$setupdir/selectedpkgs.txt"
echo "discord_arch_electron" >> "$setupdir/aurselectedpkgs.txt" echo "discord_arch_electron" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
61) 61)
#in_element=1 #in_element=1
echo "element-desktop" >> "$setupdir/selectedpkgs.txt" echo "element-desktop" >>"$setupdir/selectedpkgs.txt"
;; ;;
62) 62)
#in_telegram=1 #in_telegram=1
echo "telegram-desktop" >> "$setupdir/selectedpkgs.txt" echo "telegram-desktop" >>"$setupdir/selectedpkgs.txt"
;; ;;
70) 70)
echo "testssl.sh" >> "$setupdir/selectedpkgs.txt" echo "testssl.sh" >>"$setupdir/selectedpkgs.txt"
;; ;;
80) 80)
echo "onedriver" >> "$setupdir/aurselectedpkgs.txt" echo "onedriver" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
esac esac
done done
@ -218,23 +215,22 @@ in_podman=0
cmd=(dialog --separate-output --checklist "Devtools" 22 76 16) cmd=(dialog --separate-output --checklist "Devtools" 22 76 16)
options=(0 "doom-emacs" off options=(0 "doom-emacs" off
1 "vscodium" off 1 "vscodium" off
10 "Podman" off) 10 "Podman" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
for choice in $choices for choice in $choices; do
do
case $choice in case $choice in
0) 0)
in_doomemacs=1 in_doomemacs=1
# TODO sort pacman and AUR packages # TODO sort pacman and AUR packages
# pychecker not in AUR anymore # pychecker not in AUR anymore
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" 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 # TODO handle rest of installation
;; ;;
1) 1)
#in_vscodium=1 #in_vscodium=1
echo "vscodium-bin" >> "$setupdir/aurselectedpkgs.txt" echo "vscodium-bin" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
10) 10)
in_podman=1 in_podman=1
@ -247,24 +243,23 @@ done
cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16) cmd=(dialog --separate-output --checklist "School and work communication" 22 76 16)
options=(0 "Teams" off options=(0 "Teams" off
1 "Slack" off 1 "Slack" off
10 "OneNote" off) 10 "OneNote" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
for choice in $choices for choice in $choices; do
do
case $choice in case $choice in
0) 0)
#in_teams=1 #in_teams=1
echo "teams" >> "$setupdir/aurselectedpkgs.txt" echo "teams" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
1) 1)
#in_slack=1 #in_slack=1
#echo "slack-desktop" >> "$setupdir/aurselectedpkgs.txt" #echo "slack-desktop" >> "$setupdir/aurselectedpkgs.txt"
echo "slack-electron" >> "$setupdir/aurselectedpkgs.txt" echo "slack-electron" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
10) 10)
echo "p3x-onenote" >> "$setupdir/aurselectedpkgs.txt" echo "p3x-onenote" >>"$setupdir/aurselectedpkgs.txt"
;; ;;
esac esac
done done
@ -275,12 +270,11 @@ cmd=(dialog --separate-output --checklist "Report installed packages?" 22 76 16)
options=(0 "pkgstats" off) options=(0 "pkgstats" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
for choice in $choices for choice in $choices; do
do
case $choice in case $choice in
0) 0)
#in_pkgstats=1 #in_pkgstats=1
echo "pkgstats" >> "$setupdir/selectedpkgs.txt" echo "pkgstats" >>"$setupdir/selectedpkgs.txt"
;; ;;
esac esac
done done
@ -291,11 +285,10 @@ in_arco_hp=0
cmd=(dialog --separate-output --checklist "Install system specific packages?" 22 76 16) cmd=(dialog --separate-output --checklist "Install system specific packages?" 22 76 16)
options=(1 "Arco PC" off options=(1 "Arco PC" off
2 "Arco HP" off) 2 "Arco HP" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear clear
for choice in $choices for choice in $choices; do
do
case $choice in case $choice in
1) 1)
in_arco_pc=1 in_arco_pc=1
@ -308,7 +301,7 @@ done
#uninstalling unused packages #uninstalling unused packages
echo Uninstalling unused packages echo Uninstalling unused packages
sudo pacman -Rns - < "$setupdir/packages/uninstall.txt" sudo pacman -Rns - <"$setupdir/packages/uninstall.txt"
echo Uninstalled unused packages echo Uninstalled unused packages
# find all repos # find all repos
@ -321,7 +314,7 @@ echo Updated packages
#pacman programs #pacman programs
echo Installing default pacman programs echo Installing default pacman programs
sudo pacman -S --needed - < "$setupdir/packages/officialpkgs.txt" sudo pacman -S --needed - <"$setupdir/packages/officialpkgs.txt"
echo Installed official programs echo Installed official programs
# pip # pip
@ -355,22 +348,22 @@ fi
# audio # audio
echo Installing audio programs echo Installing audio programs
paru -S --needed - < "$setupdir/packages/audiopkgs.txt" paru -S --needed - <"$setupdir/packages/audiopkgs.txt"
echo Installed audio programs echo Installed audio programs
#AUR #AUR
echo Installing default AUR programs echo Installing default AUR programs
paru -S --needed - < "$setupdir/packages/aurpkgs.txt" paru -S --needed - <"$setupdir/packages/aurpkgs.txt"
echo Installed AUR programs echo Installed AUR programs
# theming # theming
echo Installing themes and icons echo Installing themes and icons
paru -S --needed - < "$setupdir/packages/theme-packages.txt" paru -S --needed - <"$setupdir/packages/theme-packages.txt"
echo Installed themes and icons echo Installed themes and icons
#install wine #install wine
echo Installing wine echo Installing wine
sudo pacman -S --needed - < "$setupdir/packages/winepkgs.txt" sudo pacman -S --needed - <"$setupdir/packages/winepkgs.txt"
echo Installed wine echo Installed wine
################### ###################
@ -380,11 +373,11 @@ echo Installing selected programs
# install selected packages # install selected packages
echo Installing from official repository echo Installing from official repository
sudo pacman -S --needed - < "$setupdir/selectedpkgs.txt" sudo pacman -S --needed - <"$setupdir/selectedpkgs.txt"
# install selected aur packages # install selected aur packages
echo Installing from AUR echo Installing from AUR
paru -S --needed - < "$setupdir/aurselectedpkgs.txt" paru -S --needed - <"$setupdir/aurselectedpkgs.txt"
: ' : '
if [ $in_vmware15 -eq 1 ]; then if [ $in_vmware15 -eq 1 ]; then
@ -696,13 +689,13 @@ fi
# arco pc # arco pc
if [ $in_arco_pc -eq 1 ]; then if [ $in_arco_pc -eq 1 ]; then
echo "Installing arco pc packages" echo "Installing arco pc packages"
paru -S --needed - < "$setupdir/packages/lupusregina-packages.txt" paru -S --needed - <"$setupdir/packages/lupusregina-packages.txt"
fi fi
# arco hp # arco hp
if [ $in_arco_hp -eq 1 ]; then if [ $in_arco_hp -eq 1 ]; then
echo "Installing arch hp packages" echo "Installing arch hp packages"
paru -S --needed - < "$setupdir/packages/arch-hp-packages.txt" paru -S --needed - <"$setupdir/packages/arch-hp-packages.txt"
fi fi
############################## ##############################
@ -759,7 +752,7 @@ echo Removed setup files
echo Setting config echo Setting config
bash ~/config/install.sh bash ~/config/install.sh
if [[ $(pacman -Q pkgstats 2>/dev/null > /dev/null) ]]; then if [[ $(pacman -Q pkgstats 2>/dev/null >/dev/null) ]]; then
pkgstats pkgstats
fi fi