Update run.sh

This commit is contained in:
2024-05-20 19:00:21 +02:00
parent e2b50ac1c1
commit ca387408e7

129
run.sh
View File

@@ -3,6 +3,7 @@
# Qtile - Debian install - Martin - ITmail.dk
# nano qtile-install.sh && chmod +x qtile-install.sh && ./qtile-install.sh
# bash -c "$(wget -O- http://192.168.18.34:3005/mara/made-install/raw/branch/main/install.sh)"
# bash -c "$(wget -O- http://192.168.18.34:3005/mara/made-install/raw/branch/main/run.sh)"
# sudo apt install -y git && git clone http://192.168.18.34:3005/mara/made-install.git && cd made-install && . install.sh
# Resource links to source
@@ -95,6 +96,7 @@ clear
# Installation start screen
FULLUSERNAME=$(awk -v user="$USER" -F":" 'user==$1{print $5}' /etc/passwd)
if (whiptail --title "Installation of the Martin Qtile Desktop" --yesno "Hi $FULLUSERNAME do you want to start \nThe M.A.D.E installation ?" 10 50); then
echo -e "${GREEN} Okay, let's start the installation"
else
@@ -102,46 +104,24 @@ else
fi
# Install choice questions yes-no
questions=("Do you want to install Kitty terminal or use XTerm" \
"Is this a laptop we are installing on!" \
"Install XRDP Remote desktop" \
"Install Thunar file manager" \
"Install Google Chrome" \
"Install SMB/CIFS Storage Client" \
"Install NFS Storage Client" \
"Install Ceph Storage Client" \
"Install Neovim Text Editor" \
"Install VS Code Editor" \
)
# Install selection choose what to install Start
echo -e "${YELLOW} Install selection choose what to install ${NC}"
commands=("sudo apt install -y kitty" \
"sudo apt install -y tlp tlp-rdw" \
"sudo apt install -y xrdp && sudo systemctl restart xrdp.service" \
"sudo apt install -y thunar" \
"cd /tmp/ && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install -y /tmp/google-chrome-stable_current_amd64.deb && rm google-chrome-stable_current_amd64.deb" \
"sudo apt install -y smbclient" \
"sudo apt install -y nfs-common" \
"sudo apt install -y ceph-commen" \
"sudo apt install -y neovim" \
"cd /tmp/ && wget -O vscode_amd64.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' && sudo apt install -y /tmp/vscode_amd64.deb && rm vscode_amd64.deb && cd ~" \
)
PROGRAMS=$(whiptail --title "The Install selection" --checklist --separate-output \
"Choose what to install:" 20 78 15 \
"1" "Do you want to install Kitty terminal or use XTerm" ON \
"2" "Is this a laptop we are installing on!" OFF \
"3" "Install XRDP Remote desktop" OFF \
"4" "Install Thunar file manager" ON \
"5" "Install Google Chrome" ON \
"6" "Install Neovim Text Editor" ON \
"7" "Install VS Code Editor" OFF \
"8" "Install SMB/CIFS Storage Client" ON \
"9" "Install NFS Storage Client" OFF \
"10" "Install Ceph Storage Client" OFF 3>&1 1>&2 2>&3)
# Array to store install user choices
choices=()
# See the actual installation below - Install selection choose what to install End
# Loop through questions
for i in "${!questions[@]}"; do
# Display the question using whiptail
choice=$(whiptail --title "Question $((i+1))" --yesno "${questions[$i]}" 10 60 3>&1 1>&2 2>&3)
# Check the exit status of whiptail
if [ $? -eq 0 ]; then
choices+=("yes")
else
choices+=("no")
fi
done
clear
echo -e "${RED} "
@@ -167,7 +147,7 @@ sudo apt update
echo -e "${YELLOW} Core System APT install ${NC}"
sudo apt install -y xserver-xorg x11-utils xinit arandr autorandr picom fwupd mesa-utils htop wget curl git tmux numlockx cups xsensors xbacklight brightnessctl unzip network-manager dunst libnotify-bin notify-osd xautolock xsecurelock pm-utils rofi fontconfig fontconfig-config fonts-dejavu-core libfontconfig1 fonts-arkpandora
sudo apt install -y sddm --no-install-recommends
# sudo apt install -y feh
sudo apt install -y nitrogen nsxiv mpv flameshot speedcrunch mc gvfs-backends mpd mpc ncmpcpp fzf xarchiver
# -------------------------------------------------------------------------------------------------
@@ -219,10 +199,12 @@ echo -e "${YELLOW} CPU Microcode install END ${NC}"
echo -e "${YELLOW} Alias echo to ~/.bashrc ${NC}"
echo 'alias ls="ls --color=auto --group-directories-first -v -lah"' >> ~/.bashrc
echo 'alias upup="sudo apt update && sudo apt upgrade -y && sudo apt clean && sudo apt autoremove -y"' >> ~/.bashrc
echo 'bind '"'"'"\C-f":"open "$(fzf)"\n"'"'" >> ~/.bashrc
# -------------------------------------------------------------------------------------------------
echo -e "${YELLOW} Qtile Core Dependencies apt install ${NC}"
sudo apt install -y python3-pip python3-xcffib python3-cairocffi python3-cffi libpangocairo-1.0-0 python-dbus-dev libxkbcommon-dev libxkbcommon-x11-dev python3-venv python3-psutil
sudo apt install -y python3-pip python3-xcffib python3-cairocffi python3-cffi libpangocairo-1.0-0 python-dbus-dev libxkbcommon-dev libxkbcommon-x11-dev python3-venv python3-psutil feh
# -------------------------------------------------------------------------------------------------
echo -e "${YELLOW} Set User folders via xdg-user-dirs-update. ${NC}"
@@ -2265,19 +2247,44 @@ sudo sed -i 's+GRUB_TIMEOUT=5+GRUB_TIMEOUT=1+g' /etc/default/grub && sudo update
echo -e "${YELLOW} Edit GRUB BOOT TIMEOUT END ${NC}"
# -------------------------------------------------------------------------------------------------
# Execute the commands based on user choices
for i in "${!choices[@]}"; do
case ${choices[$i]} in
"yes" )
echo "Executing $((i+1))..."
# The command field is replaced with the correct command to be executed
eval "${commands[$i]}"
echo -e "${YELLOW} Install selection choose what to install Start ${NC}"
for PROGRAM in $PROGRAMS
do
case $PROGRAM in
"1")
sudo apt install -y kitty
;;
"no" )
echo "Skipping $((i+1))."
"2")
sudo apt install -y tlp tlp-rdw
;;
"3")
sudo apt install -y xrdp && sudo systemctl restart xrdp.service
;;
"4")
sudo apt install -y thunar
;;
"5")
cd /tmp/ && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install -y /tmp/google-chrome-stable_current_amd64.deb && rm google-chrome-stable_current_amd64.deb
;;
"6")
sudo apt install -y neovim
;;
"7")
cd /tmp/ && wget -O vscode_amd64.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' && sudo apt install -y /tmp/vscode_amd64.deb && rm vscode_amd64.deb && cd ~
;;
"8")
sudo apt install -y smbclient
;;
"9")
sudo apt install -y nfs-common
;;
"10")
sudo apt install -y ceph-commen
;;
esac
done
echo -e "${YELLOW} Install selection choose what to install End ${NC}"
# -------------------------------------------------------------------------------------------------
@@ -2375,12 +2382,6 @@ keys = [
Key([mod, "shift"], "r", lazy.spawncmd(), desc="Spawn a command using a prompt widget"),
Key([mod], "l", lazy.spawn(os.path.expanduser("xsecurelock")), desc='Computer Lockdown'),
# ScratchPad Keybindings
Key([mod, "shift"], "Return", lazy.group['scratchpad'].dropdown_toggle('term')),
Key([mod, "shift"], "e", lazy.group['scratchpad'].dropdown_toggle('mc')),
Key([mod, "shift"], "v", lazy.group['scratchpad'].dropdown_toggle('volume')),
Key([mod, "shift"], "t", lazy.group['scratchpad'].dropdown_toggle('term2')),
# Default
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
@@ -2477,16 +2478,16 @@ for vt in range(1, 8):
# nf-md-pac_man 󰮯 nf-md-ghost 󰊠 nf-fa-circle  nf-cod-circle_large  nf-cod-circle_filled  nf-md-circle_small 󰧟 nf-md-circle_medium 󰧞
groups = [
Group("1", label="", layout="monadtall"),
Group("1", label="󰮯", layout="monadtall"),
Group("2", label="󰧞", layout="monadtall"),
Group("3", label="󰮯", layout="monadtall"),
Group("3", label="", layout="monadtall"),
Group("4", label="󰧞", layout="monadtall"),
Group("5", label="󰧞", layout="monadtall"),
Group("6", label="", layout="monadtall"),
Group("5", label="󰊠", layout="monadtall"),
Group("6", label="󰧞", layout="monadtall"),
Group("7", label="󰧞", layout="monadtall"),
Group("8", label="󰊠", layout="monadtall"),
Group("8", label="", layout="monadtall"),
Group("9", label="󰧞", layout="monadtall"),
Group("0", label="", layout="bsp"),
Group("0", label="", layout="bsp"),
]
for i in groups:
@@ -2513,6 +2514,14 @@ for i in groups:
]
)
# ScratchPad Keybindings
keys.extend([
Key([mod, "shift"], "Return", lazy.group['scratchpad'].dropdown_toggle('term')),
Key([mod, "shift"], "e", lazy.group['scratchpad'].dropdown_toggle('mc')),
Key([mod, "shift"], "v", lazy.group['scratchpad'].dropdown_toggle('volume')),
Key([mod, "shift"], "t", lazy.group['scratchpad'].dropdown_toggle('term2')),
])
# ScratchPads
groups.append(ScratchPad("scratchpad", [
DropDown("term", "kitty --class=scratch", width=0.8, height=0.8, x=0.1, y=0.1, opacity=1),