diff --git a/Bash Scripts/Install_Programs.sh b/Bash Scripts/Install_Programs.sh index d42a876..c42e3d6 100644 --- a/Bash Scripts/Install_Programs.sh +++ b/Bash Scripts/Install_Programs.sh @@ -20,7 +20,7 @@ ask_install () { echo } -install_brave () { +install_brave_origin () { PACKAGE="Brave Origin" printf "Install %s? [y/N]: " "$PACKAGE" read answer @@ -70,7 +70,7 @@ install_angry_ip_scanner () { | grep '"tag_name"' \ | cut -d '"' -f4) - if [[ -z "$LATEST_TAG" ]]; then + if [ -z "$LATEST_TAG" ]; then echo "❌ Failed to determine latest version" exit 1 fi @@ -248,6 +248,76 @@ install_balena_etcher () { echo } +install_tlp () { + PACKAGE="TLP" + printf "Install %s? [y/N]: " "$PACKAGE" + read answer + case "$answer" in + y|Y) + echo "Installing $PACKAGE..." + # power-profiles-daemon (default on GNOME/KDE) fights TLP over the same settings + if systemctl list-unit-files power-profiles-daemon.service >/dev/null 2>&1; then + sudo systemctl disable --now power-profiles-daemon.service || true + sudo systemctl mask power-profiles-daemon.service + fi + sudo apt install -y tlp tlp-rdw + sudo systemctl enable --now tlp.service + sudo tlp-stat -s # should show "State = enabled" + sudo tlp-stat -b || true # battery info + ;; + *) + echo "Skipping $PACKAGE" + ;; + esac + echo +} + +install_vscode () { + PACKAGE="Visual Studio Code" + printf "Install %s? [y/N]: " "$PACKAGE" + read answer + case "$answer" in + y|Y) + echo "Installing $PACKAGE..." + sudo apt install -y wget gpg apt-transport-https + wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/packages.microsoft.gpg > /dev/null + echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null + sudo apt update + sudo apt install -y code + sudo rm -f /etc/apt/sources.list.d/vscode.list + ;; + *) + echo "Skipping $PACKAGE" + ;; + esac + echo +} + +install_ufw () { + PACKAGE="UFW" + printf "Install %s? [y/N]: " "$PACKAGE" + read answer + case "$answer" in + y|Y) + echo "Installing $PACKAGE..." + sudo apt install -y ufw + sudo ufw default deny incoming + sudo ufw default allow outgoing + # If running over SSH, allow the port this session came in on so enabling doesn't kill it + if [ -n "$SSH_CONNECTION" ]; then + SSH_PORT=$(echo "$SSH_CONNECTION" | awk '{print $4}') + sudo ufw allow "$SSH_PORT/tcp" + fi + sudo ufw --force enable + sudo ufw status verbose + ;; + *) + echo "Skipping $PACKAGE" + ;; + esac + echo +} + echo "Updating package list..." sudo apt update echo @@ -263,13 +333,10 @@ ask_install "Steam" "steam" ask_install "mpv" "mpv" ask_install "Hydrapaper" "hydrapaper" ask_install "Thunderbird" "thunderbird" -#wine -#WineZGUI -#TLP -#TLP-UI +ask_install "Firefox ESR" "firefox-esr" # Not in standard Debian repos -install_brave +install_brave_origin install_discord install_angry_ip_scanner install_onlyoffice @@ -278,13 +345,13 @@ install_joplin install_flatseal install_stremio install_balena_etcher -#"Visual Studio Code" "Requires Microsoft APT repo" +install_tlp +install_vscode +install_ufw -#Brave-Origin #jexiftoolgui? -#thunderbird (installed by default?) -#firefox (installed by default?) #redshift? -#UFW? +#wine +#WineZGUI echo "Finished." \ No newline at end of file