From d48a46d2a17bd575782d2f30762271cae8a90c1e Mon Sep 17 00:00:00 2001 From: yuriy Date: Sun, 2 Apr 2023 21:44:47 -0400 Subject: [PATCH] test --- Linux_Toolbox_v1.sh | 172 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 Linux_Toolbox_v1.sh diff --git a/Linux_Toolbox_v1.sh b/Linux_Toolbox_v1.sh new file mode 100644 index 0000000..962e2f6 --- /dev/null +++ b/Linux_Toolbox_v1.sh @@ -0,0 +1,172 @@ +#!/bin/bash + +# paru -S plasma-wayland-session --noconfirm + + +#status = $yad --form --field check1:chk --field check2:chk --field check3:chk --field check4:chk --field ph:chk + +yadResults=$(yad --form --columns=3 --field Debloat:chk --field paru:chk --field htop:chk --field nomachine:chk --field librewolf-bin:chk --field pacseek-bin:chk --field docker:chk --field ph:chk --field ph:chk --field ph:chk --column=2 --field Config:LBL --field Grub-Timeout:chk --field Konsave:chk --field Flexo:chk --field Enable-SSH:chk --field ph:chk --field ph:chk --field ph:chk --field ph:chk --field ph:chk --field nop:chk --field:H --field:H --field:H --field:H --field:H --field:H --field:H --field nop:chk) +#DRIVEPART="`echo $PARTS | cut -d "|" -f 2`" +echo $yadResults + + + +IFS='|' # space is set as delimiter +read -ra SECTIONS <<< "$yadResults" # str is read into an array as tokens separated by IFS + + + + + +# echo "first section" +# echo "${SECTIONS[0]}" +# echo "second:" +# echo "${SECTIONS[1]}" +# echo "loop" + + +index=0 +for i in "${SECTIONS[@]}"; do # access each element of array + #echo "$index" + #echo "$i" + + + +if [[ $index -eq 0 ]] +then # DEBLOAT + if [[ $i == *"TRUE"* ]]; then + echo "Uninstalling EOS Extras" + sudo pacman -R firewalld eos-update-notifier welcome eos-quickstart --noconfirm + fi +fi + + +if [[ $index -eq 1 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Installing paru" + sudo pacman -S paru --noconfirm + fi +fi + +if [[ $index -eq 2 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Installing htop" + paru -S htop --noconfirm + fi +fi + +if [[ $index -eq 3 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Installing NoMachine" + paru -S nomachine --noconfirm + fi +fi + +if [[ $index -eq 4 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Installing LibreWolf" + paru -S librewolf-bin --noconfirm + fi +fi + +if [[ $index -eq 5 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "installing pacseek" + paru -S pacseek-bin --noconfirm + fi +fi + + +if [[ $index -eq 6 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Installing and enabling Docker" + paru -S docker --noconfirm && sudo systemctl enable docker.service && sudo systemctl enable containerd.service + fi +fi + + +if [[ $index -eq 11 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Changing GRUB timeout" + sudo nano /etc/default/grub + sudo grub-mkconfig -o /boot/grub/grub.cfg + fi +fi + + +if [[ $index -eq 12 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Installing Konsave and Importing Profile" + paru -S konsave --noconfirm + cd /home/terminal/Downloads/ + smbget smb://smb/Toolbox/Installs/Linux/KonsaveTMPLT.knsv -a + + #konsave -i $PWD/KonsaveTMPLT.knsv -f + + konsave -i /home/terminal/Downloads/KonsaveTMPLT.knsv -f + konsave -a KonsaveTMPLT + # reboot + fi +fi +if [[ $index -eq 13 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Adding Flexo to mirrorlist" + echo 'Server = http://206.210.43.222:7878/$repo/os/$arch' | sudo tee -a /etc/pacman.d/mirrorlist + fi +fi + + +if [[ $index -eq 14 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "Enabling SSH Access" + sudo systemctl enable sshd.service && sudo systemctl start sshd.service + fi +fi + + +if [[ $index -eq 15 ]] +then + if [[ $i == *"TRUE"* ]]; then + echo "TEMPLATE" + fi +fi + + + + + + + ((index++)) # Add 1 to count +done + + + +#items=`yad --list --separator='' --height=600 --multiple --column="Items" item1 item2 item3` + + +#echo $items + +# for item in $SECTIONS; do +# echo "$item" +# done + + + +#yad --title="Desktop entry editor" --text="Simple desktop entry editor" \ +#--form --field="Type:CB" --field="Name" --field="Generic name" \ +#--field="Comment" --field="Command:FL" --field="Icon" \ +#--field="In termianl:CHK" --field="Startup notify:CHK" \ +#"Application!URI" "Name" "Generic name" "This is the comment" \ +#"/usr/bin/yad" "yad" FALSE TRUE + +