From 868ab49ac18cc4fa7f7b4d62d59bd64058771392 Mon Sep 17 00:00:00 2001 From: Super User Date: Mon, 9 Jun 2025 06:59:56 +0000 Subject: [PATCH] First-Commit --- README.md | 3 +- disable_remote_services | 4 ++ enable_remote_services_automode | 4 ++ enable_remote_services_manualmode | 6 ++ flatpacks/developer_divers | 7 +++ flatpacks/developer_jetbrains | 11 ++++ flatpacks/gaming_clients | 2 + flatpacks/gaming_emulators | 16 ++++++ flatpacks/gaming_games | 21 +++++++ flatpacks/gaming_minecraft | 1 + flatpacks/graphics_editors | 3 + flatpacks/keyguard_bitwarden_client | 3 + flatpacks/many_useful_tools | 76 +++++++++++++++++++++++++ flatpacks/rdeveloper_vscode | 35 ++++++++++++ flatpacks/uninstall_developer_divers | 7 +++ flatpacks/uninstall_developer_jetbrains | 11 ++++ flatpacks/uninstall_developer_vscode | 5 ++ flatpacks/uninstall_gaming_clients | 1 + flatpacks/uninstall_gaming_emulators | 16 ++++++ flatpacks/uninstall_gaming_games | 21 +++++++ flatpacks/uninstall_gaming_minecraft | 1 + flatpacks/uninstall_graphics_editors | 3 + flatpacks/uninstall_many_useful_tools | 76 +++++++++++++++++++++++++ flatpacks/uninstall_web_browsers | 18 ++++++ flatpacks/web_browsers | 18 ++++++ flatpak_selections | 43 ++++++++++++++ install_nvidia_driver | 38 +++++++++++++ run_cubic | 6 ++ toolbox | 43 ++++++++++++++ update_scriptbase | 11 ++++ update_system_with_apt | 5 ++ update_system_with_nala | 5 ++ 32 files changed, 519 insertions(+), 1 deletion(-) create mode 100644 disable_remote_services create mode 100644 enable_remote_services_automode create mode 100644 enable_remote_services_manualmode create mode 100644 flatpacks/developer_divers create mode 100644 flatpacks/developer_jetbrains create mode 100644 flatpacks/gaming_clients create mode 100644 flatpacks/gaming_emulators create mode 100644 flatpacks/gaming_games create mode 100644 flatpacks/gaming_minecraft create mode 100644 flatpacks/graphics_editors create mode 100644 flatpacks/keyguard_bitwarden_client create mode 100644 flatpacks/many_useful_tools create mode 100644 flatpacks/rdeveloper_vscode create mode 100644 flatpacks/uninstall_developer_divers create mode 100644 flatpacks/uninstall_developer_jetbrains create mode 100644 flatpacks/uninstall_developer_vscode create mode 100644 flatpacks/uninstall_gaming_clients create mode 100644 flatpacks/uninstall_gaming_emulators create mode 100644 flatpacks/uninstall_gaming_games create mode 100644 flatpacks/uninstall_gaming_minecraft create mode 100644 flatpacks/uninstall_graphics_editors create mode 100644 flatpacks/uninstall_many_useful_tools create mode 100644 flatpacks/uninstall_web_browsers create mode 100644 flatpacks/web_browsers create mode 100644 flatpak_selections create mode 100644 install_nvidia_driver create mode 100644 run_cubic create mode 100644 toolbox create mode 100644 update_scriptbase create mode 100644 update_system_with_apt create mode 100644 update_system_with_nala diff --git a/README.md b/README.md index 5bcb7aa..98b8f35 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ -# Dynamic-Scripts-Toolbox +# TyOS-Local-Scripts +Scripts intégrés de TyOS - Ce dépôt peut être réinjecter dans l'OS dynamiquement. \ No newline at end of file diff --git a/disable_remote_services b/disable_remote_services new file mode 100644 index 0000000..fe03567 --- /dev/null +++ b/disable_remote_services @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sudo systemctl disable --now xrdp xrdp-sesman cockpit.socket ssh +echo "Use automode to enable them" \ No newline at end of file diff --git a/enable_remote_services_automode b/enable_remote_services_automode new file mode 100644 index 0000000..5520fbb --- /dev/null +++ b/enable_remote_services_automode @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sudo apt update +sudo apt install -y xrdp cockpit ssh diff --git a/enable_remote_services_manualmode b/enable_remote_services_manualmode new file mode 100644 index 0000000..5b6a2e3 --- /dev/null +++ b/enable_remote_services_manualmode @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +sudo apt update +sudo apt install -y xrdp cockpit ssh +sudo systemctl disable --now xrdp xrdp-sesman cockpit.socket ssh +echo "Use automode to enable them" \ No newline at end of file diff --git a/flatpacks/developer_divers b/flatpacks/developer_divers new file mode 100644 index 0000000..dea8a05 --- /dev/null +++ b/flatpacks/developer_divers @@ -0,0 +1,7 @@ +sudo flatpak install flathub -y \ +org.eclipse.Java \ +me.iepure.devtoolbox \ +io.github.nokse22.inspector \ +us.pixls.art.ART \ +com.google.AndroidStudio \ +com.helix_editor.Helix \ No newline at end of file diff --git a/flatpacks/developer_jetbrains b/flatpacks/developer_jetbrains new file mode 100644 index 0000000..0de1f8d --- /dev/null +++ b/flatpacks/developer_jetbrains @@ -0,0 +1,11 @@ +sudo flatpak install flathub -y \ +com.jetbrains.Rider \ +com.jetbrains.PyCharm-Community \ +com.jetbrains.RubyMine \ +com.jetbrains.GoLand \ +com.jetbrains.RustRover \ +com.jetbrains.PhpStorm \ +com.jetbrains.DataGrip \ +com.jetbrains.WebStorm \ +com.jetbrains.IntelliJ-IDEA-Community \ +com.jetbrains.Rider \ No newline at end of file diff --git a/flatpacks/gaming_clients b/flatpacks/gaming_clients new file mode 100644 index 0000000..16f5b91 --- /dev/null +++ b/flatpacks/gaming_clients @@ -0,0 +1,2 @@ +sudo nala update +sudo nala install steam-installer lutris -y \ No newline at end of file diff --git a/flatpacks/gaming_emulators b/flatpacks/gaming_emulators new file mode 100644 index 0000000..cd74905 --- /dev/null +++ b/flatpacks/gaming_emulators @@ -0,0 +1,16 @@ +sudo flatpak install flathub -y \ +org.ppsspp.PPSSPP \ +net.shadps4.shadPS4 \ +net.rpcs3.RPCS3 \ +net.pcsx2.PCSX2 \ +org.duckstation.DuckStation \ +com.github.Rosalie241.RMG \ +net.kuribo64.melonDS \ +io.mgba.mGBA \ +io.github.ryubing.Ryujinx \ +app.xemu.xemu \ +com.snes9x.Snes9x \ +org.purei.Play \ +org.mamedev.MAME \ +io.github.sameboy.SameBoy \ +com.vba_m.visualboyadvance-m \ No newline at end of file diff --git a/flatpacks/gaming_games b/flatpacks/gaming_games new file mode 100644 index 0000000..7262fb2 --- /dev/null +++ b/flatpacks/gaming_games @@ -0,0 +1,21 @@ +sudo flatpak install flathub -y \ +io.gitlab.stone_kingdoms.StoneKingdoms \ +io.openrct2.OpenRCT2 \ +uk.co.powdertoy.tpt \ +net.hhoney.rota \ +net.hhoney.tinycrate \ +org.gnome.Sudoku \ +org.kartkrew.RingRacers \ +com.github.Anuken.Mindustry \ +org.srb2.SRB2Kart \ +net.sourceforge.ExtremeTuxRacer \ +io.sourceforge.trigger_rally.TriggerRally \ +net.sourceforge.torcs \ +dev.tchx84.Gameeky \ +com.github.juzzlin.DustRacing2D \ +com.simutrans.Simutrans \ +ca.victorz.acr.AssaultCubeReloaded \ +com.adilhanney.ricochlime \ +io.sourceforge.YSoccer \ +io.thp.numptyphysics \ +de.blobbyvolley.BlobbyVolley2 \ No newline at end of file diff --git a/flatpacks/gaming_minecraft b/flatpacks/gaming_minecraft new file mode 100644 index 0000000..ac312a5 --- /dev/null +++ b/flatpacks/gaming_minecraft @@ -0,0 +1 @@ +sudo flatpak install flathub -y com.atlauncher.ATLauncher \ No newline at end of file diff --git a/flatpacks/graphics_editors b/flatpacks/graphics_editors new file mode 100644 index 0000000..66f6567 --- /dev/null +++ b/flatpacks/graphics_editors @@ -0,0 +1,3 @@ +sudo flatpak install flathub -y \ +org.kde.krita \ +in.co.nandakumar.vara \ No newline at end of file diff --git a/flatpacks/keyguard_bitwarden_client b/flatpacks/keyguard_bitwarden_client new file mode 100644 index 0000000..903fbe9 --- /dev/null +++ b/flatpacks/keyguard_bitwarden_client @@ -0,0 +1,3 @@ + +sudo wget "https://hst.tyleo.dev/flatpaks/keyguard.flatpak" -O /tmp/keyguard.flatpak +sudo flatpak install -y /tmp/keyguard.flatpak diff --git a/flatpacks/many_useful_tools b/flatpacks/many_useful_tools new file mode 100644 index 0000000..13b6e78 --- /dev/null +++ b/flatpacks/many_useful_tools @@ -0,0 +1,76 @@ +sudo flatpak install flathub -y \ +com.github.tchx84.Flatseal \ +io.github.dweymouth.supersonic \ +com.bitwarden.desktop \ +org.onlyoffice.desktopeditors \ +io.github.revisto.drum-machine \ +io.github.jeffshee.Hidamari \ +io.github.dvlv.boxbuddyrs \ +io.github.flattool.Ignition \ +org.mozilla.Thunderbird \ +io.github.mmstick.FontFinder \ +org.kde.calligra \ +com.github.unrud.VideoDownloader \ +com.hunterwittenborn.Celeste \ +io.github.giantpinkrobots.varia \ +md.obsidian.Obsidian \ +io.gitlab.news_flash.NewsFlash \ +org.cockpit_project.CockpitClient \ +org.sqlitebrowser.sqlitebrowser \ +com.github.finefindus.eyedropper \ +io.missioncenter.MissionCenter \ +org.gnome.design.Lorem \ +io.github.lo2dev.Echo \ +io.github.realmazharhussain.GdmSettings \ +com.mattjakeman.ExtensionManager \ +io.gitlab.elescoute.password \ +org.dupot.easyflatpak \ +com.konstantintutsch.Lock \ +io.github.vikdevelop.SaveDesktop \ +io.github.plrigaux.sysd-manager \ +io.github.vemonet.EmojiMart \ +com.github.fabiocolacio.marker \ +org.gnome.DejaDup \ +de.schmidhuberj.DieBahn \ +dev.zelikos.rollit \ +im.bernard.Memorado \ +app/com.github.iwalton3.jellyfin-media-player \ +it.mijorus.gearlever \ +io.github.flattool.Warehouse \ +io.gitlab.adhami3310.Impression \ +com.jgraph.drawio.desktop \ +org.gabmus.swatch \ +io.github.wiiznokes.fan-control \ +io.github.fsobolev.TimeSwitch \ +ca.vlacroix.Tally \ +dev.qwery.AddWater \ +org.gnome.World.PikaBackup \ +com.gitlab.davem.ClamTk \ +com.github.alecaddd.sequeler \ +it.fabiodistasio.AntaresSQL \ +io.gitlab.elescoute.spacelaunch \ +me.iepure.devtoolbox \ +com.github.phase1geo.minder \ +ca.desrt.dconf-editor \ +page.codeberg.libre_menu_editor.LibreMenuEditor \ +pl.youkai.nscan \ +app.drey.Dialect \ +org.gnome.Geary \ +com.github.hugolabe.Wike \ +com.rafaelmardojai.Blanket \ +ca.edestcroix.Recordbox \ +org.nickvision.tagger \ +io.github.nokse22.asciidraw \ +net.nokyan.Resources \ +org.easycoding.TunedSwitcher \ +io.github.halfmexican.Mingle \ +org.gnome.Firmware \ +io.github.ronniedroid.concessio \ +net.codelogistics.webapps \ +io.freetubeapp.FreeTube \ +io.github.amit9838.mousam \ +org.gabmus.whatip \ +com.quexten.Goldwarden \ +info.smplayer.SMPlayer \ +io.github.kukuruzka165.materialgram \ +com.usebottles.bottles \ No newline at end of file diff --git a/flatpacks/rdeveloper_vscode b/flatpacks/rdeveloper_vscode new file mode 100644 index 0000000..6e5170f --- /dev/null +++ b/flatpacks/rdeveloper_vscode @@ -0,0 +1,35 @@ +#!/bin/bash + +# Définition du fichier de log +LOG_DIR="$HOME/.logs" +LOG_FILE="$LOG_DIR/flatpak_install.log" + +# Création du répertoire de logs +mkdir -p "$LOG_DIR" + +# Fonction de logging +log() { + echo "$(date +"%Y-%m-%d %H:%M:%S") | $1" | tee -a "$LOG_FILE" +} + +log "Début de l'installation de VSCode Stable via Flatpak." + +# Ajout du dépôt Flathub +log "Ajout du dépôt Flathub..." +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +log "Flathub ajouté." + +# Installation de VSCode Stable +log "Installation de VSCode Stable..." +flatpak install -y flathub com.visualstudio.code +log "Installation terminée." + +# Accorder les autorisations +log "Configuration des autorisations..." +flatpak override --user --filesystem=host com.visualstudio.code +flatpak override --user --device=all com.visualstudio.code +flatpak override --user --socket=system-bus com.visualstudio.code +log "Autorisations accordées." + +log "Installation et configuration de VSCode Stable terminées avec succès ! 🚀" + diff --git a/flatpacks/uninstall_developer_divers b/flatpacks/uninstall_developer_divers new file mode 100644 index 0000000..5b6b4c9 --- /dev/null +++ b/flatpacks/uninstall_developer_divers @@ -0,0 +1,7 @@ +sudo flatpak remove -y \ +org.eclipse.Java \ +me.iepure.devtoolbox \ +io.github.nokse22.inspector \ +us.pixls.art.ART \ +com.google.AndroidStudio \ +com.helix_editor.Helix \ No newline at end of file diff --git a/flatpacks/uninstall_developer_jetbrains b/flatpacks/uninstall_developer_jetbrains new file mode 100644 index 0000000..f9c5d7e --- /dev/null +++ b/flatpacks/uninstall_developer_jetbrains @@ -0,0 +1,11 @@ +sudo flatpak remove -y \ +com.jetbrains.Rider \ +com.jetbrains.PyCharm-Community \ +com.jetbrains.RubyMine \ +com.jetbrains.GoLand \ +com.jetbrains.RustRover \ +com.jetbrains.PhpStorm \ +com.jetbrains.DataGrip \ +com.jetbrains.WebStorm \ +com.jetbrains.IntelliJ-IDEA-Community \ +com.jetbrains.Rider \ No newline at end of file diff --git a/flatpacks/uninstall_developer_vscode b/flatpacks/uninstall_developer_vscode new file mode 100644 index 0000000..1a9158e --- /dev/null +++ b/flatpacks/uninstall_developer_vscode @@ -0,0 +1,5 @@ +sudo flatpak remove -y \ +com.vscodium.codium-insiders \ +com.vscodium.codium \ +com.visualstudio.code-oss \ +com.visualstudio.code \ No newline at end of file diff --git a/flatpacks/uninstall_gaming_clients b/flatpacks/uninstall_gaming_clients new file mode 100644 index 0000000..20d644a --- /dev/null +++ b/flatpacks/uninstall_gaming_clients @@ -0,0 +1 @@ +sudo nala remove steam-installer -y \ No newline at end of file diff --git a/flatpacks/uninstall_gaming_emulators b/flatpacks/uninstall_gaming_emulators new file mode 100644 index 0000000..46f68fc --- /dev/null +++ b/flatpacks/uninstall_gaming_emulators @@ -0,0 +1,16 @@ +sudo flatpak remove -y \ +org.ppsspp.PPSSPP \ +net.shadps4.shadPS4 \ +net.rpcs3.RPCS3 \ +net.pcsx2.PCSX2 \ +org.duckstation.DuckStation \ +com.github.Rosalie241.RMG \ +net.kuribo64.melonDS \ +io.mgba.mGBA \ +io.github.ryubing.Ryujinx \ +app.xemu.xemu \ +com.snes9x.Snes9x \ +org.purei.Play \ +org.mamedev.MAME \ +io.github.sameboy.SameBoy \ +com.vba_m.visualboyadvance-m \ No newline at end of file diff --git a/flatpacks/uninstall_gaming_games b/flatpacks/uninstall_gaming_games new file mode 100644 index 0000000..db90092 --- /dev/null +++ b/flatpacks/uninstall_gaming_games @@ -0,0 +1,21 @@ +sudo flatpak remove -y \ +io.gitlab.stone_kingdoms.StoneKingdoms \ +io.openrct2.OpenRCT2 \ +uk.co.powdertoy.tpt \ +net.hhoney.rota \ +net.hhoney.tinycrate \ +org.gnome.Sudoku \ +org.kartkrew.RingRacers \ +com.github.Anuken.Mindustry \ +org.srb2.SRB2Kart \ +net.sourceforge.ExtremeTuxRacer \ +io.sourceforge.trigger_rally.TriggerRally \ +net.sourceforge.torcs \ +dev.tchx84.Gameeky \ +com.github.juzzlin.DustRacing2D \ +com.simutrans.Simutrans \ +ca.victorz.acr.AssaultCubeReloaded \ +com.adilhanney.ricochlime \ +io.sourceforge.YSoccer \ +io.thp.numptyphysics \ +de.blobbyvolley.BlobbyVolley2 \ No newline at end of file diff --git a/flatpacks/uninstall_gaming_minecraft b/flatpacks/uninstall_gaming_minecraft new file mode 100644 index 0000000..9d9e310 --- /dev/null +++ b/flatpacks/uninstall_gaming_minecraft @@ -0,0 +1 @@ +sudo flatpak remove -y com.atlauncher.ATLauncher \ No newline at end of file diff --git a/flatpacks/uninstall_graphics_editors b/flatpacks/uninstall_graphics_editors new file mode 100644 index 0000000..04fcc65 --- /dev/null +++ b/flatpacks/uninstall_graphics_editors @@ -0,0 +1,3 @@ +sudo flatpak remove -y \ +org.kde.krita \ +in.co.nandakumar.vara \ No newline at end of file diff --git a/flatpacks/uninstall_many_useful_tools b/flatpacks/uninstall_many_useful_tools new file mode 100644 index 0000000..19feb9e --- /dev/null +++ b/flatpacks/uninstall_many_useful_tools @@ -0,0 +1,76 @@ +sudo flatpak remove -y \ +com.github.tchx84.Flatseal \ +io.github.dweymouth.supersonic \ +com.bitwarden.desktop \ +org.onlyoffice.desktopeditors \ +io.github.revisto.drum-machine \ +io.github.jeffshee.Hidamari \ +io.github.dvlv.boxbuddyrs \ +io.github.flattool.Ignition \ +org.mozilla.Thunderbird \ +io.github.mmstick.FontFinder \ +org.kde.calligra \ +com.github.unrud.VideoDownloader \ +com.hunterwittenborn.Celeste \ +io.github.giantpinkrobots.varia \ +md.obsidian.Obsidian \ +io.gitlab.news_flash.NewsFlash \ +org.cockpit_project.CockpitClient \ +org.sqlitebrowser.sqlitebrowser \ +com.github.finefindus.eyedropper \ +io.missioncenter.MissionCenter \ +org.gnome.design.Lorem \ +io.github.lo2dev.Echo \ +io.github.realmazharhussain.GdmSettings \ +com.mattjakeman.ExtensionManager \ +io.gitlab.elescoute.password \ +org.dupot.easyflatpak \ +com.konstantintutsch.Lock \ +io.github.vikdevelop.SaveDesktop \ +io.github.plrigaux.sysd-manager \ +io.github.vemonet.EmojiMart \ +com.github.fabiocolacio.marker \ +org.gnome.DejaDup \ +de.schmidhuberj.DieBahn \ +dev.zelikos.rollit \ +im.bernard.Memorado \ +app/com.github.iwalton3.jellyfin-media-player \ +it.mijorus.gearlever \ +io.github.flattool.Warehouse \ +io.gitlab.adhami3310.Impression \ +com.jgraph.drawio.desktop \ +org.gabmus.swatch \ +io.github.wiiznokes.fan-control \ +io.github.fsobolev.TimeSwitch \ +ca.vlacroix.Tally \ +dev.qwery.AddWater \ +org.gnome.World.PikaBackup \ +com.gitlab.davem.ClamTk \ +com.github.alecaddd.sequeler \ +it.fabiodistasio.AntaresSQL \ +io.gitlab.elescoute.spacelaunch \ +me.iepure.devtoolbox \ +com.github.phase1geo.minder \ +ca.desrt.dconf-editor \ +page.codeberg.libre_menu_editor.LibreMenuEditor \ +pl.youkai.nscan \ +app.drey.Dialect \ +org.gnome.Geary \ +com.github.hugolabe.Wike \ +com.rafaelmardojai.Blanket \ +ca.edestcroix.Recordbox \ +org.nickvision.tagger \ +io.github.nokse22.asciidraw \ +net.nokyan.Resources \ +org.easycoding.TunedSwitcher \ +io.github.halfmexican.Mingle \ +org.gnome.Firmware \ +io.github.ronniedroid.concessio \ +net.codelogistics.webapps \ +io.freetubeapp.FreeTube \ +io.github.amit9838.mousam \ +org.gabmus.whatip \ +com.quexten.Goldwarden \ +info.smplayer.SMPlayer \ +io.github.kukuruzka165.materialgram \ +com.usebottles.bottles \ No newline at end of file diff --git a/flatpacks/uninstall_web_browsers b/flatpacks/uninstall_web_browsers new file mode 100644 index 0000000..9e73910 --- /dev/null +++ b/flatpacks/uninstall_web_browsers @@ -0,0 +1,18 @@ +sudo flatpak remove -y \ +net.mullvad.MullvadBrowser \ +com.humatarayici.od \ +org.chromium.Chromium \ +org.mozilla.firefox \ +com.opera.Opera \ +io.github.ungoogled_software.ungoogled_chromium \ +org.garudalinux.firedragon \ +one.ablaze.floorp \ +app.zen_browser.zen \ +com.google.Chrome \ +org.kde.falkon \ +net.waterfox.waterfox \ +org.netsurf_browser.NetSurf \ +io.gitlab.librewolf-community \ +com.microsoft.Edge \ +org.eu.getcatalyst.Catalyst \ +com.brave.Browser \ No newline at end of file diff --git a/flatpacks/web_browsers b/flatpacks/web_browsers new file mode 100644 index 0000000..8a44ead --- /dev/null +++ b/flatpacks/web_browsers @@ -0,0 +1,18 @@ +sudo flatpak install flathub -y \ +net.mullvad.MullvadBrowser \ +com.humatarayici.od \ +org.chromium.Chromium \ +org.mozilla.firefox \ +com.opera.Opera \ +io.github.ungoogled_software.ungoogled_chromium \ +org.garudalinux.firedragon \ +one.ablaze.floorp \ +app.zen_browser.zen \ +com.google.Chrome \ +org.kde.falkon \ +net.waterfox.waterfox \ +org.netsurf_browser.NetSurf \ +io.gitlab.librewolf-community \ +com.microsoft.Edge \ +org.eu.getcatalyst.Catalyst \ +com.brave.Browser \ No newline at end of file diff --git a/flatpak_selections b/flatpak_selections new file mode 100644 index 0000000..d4b15ff --- /dev/null +++ b/flatpak_selections @@ -0,0 +1,43 @@ +#!/bin/bash + +# Define the folder containing scripts +SCRIPT_DIR="/usr/local/bin/flatpacks" + +# Check if the directory exists +if [[ ! -d "$SCRIPT_DIR" ]]; then + echo "Directory $SCRIPT_DIR does not exist." + exit 1 +fi + +# Get the list of executable scripts +SCRIPTS=($(find "$SCRIPT_DIR" -maxdepth 1 -type f -executable)) + +# Check if there are any scripts +if [[ ${#SCRIPTS[@]} -eq 0 ]]; then + whiptail --msgbox "No executable scripts found in $SCRIPT_DIR." 10 40 + exit 0 +fi + +# Prepare menu options +MENU_OPTIONS=() +declare -A SCRIPT_MAP + +for script in "${SCRIPTS[@]}"; do + # Get base name, remove underscores, and capitalize first letter of each word + DISPLAY_NAME=$(basename "$script" | sed 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2)); print}') + + # Exclude scripts with "Toolbox" in the name + if [[ "$DISPLAY_NAME" != *"Toolbox"* ]]; then + MENU_OPTIONS+=("$DISPLAY_NAME" "") + SCRIPT_MAP["$DISPLAY_NAME"]="$script" + fi +done + +# Show the menu using whiptail with the new title +CHOICE=$(whiptail --title "TyOS Flatpacks Selections" --menu "Choose A Script To Run:" 15 50 5 "${MENU_OPTIONS[@]}" 3>&1 1>&2 2>&3) + +# Check if the user made a selection +if [[ -n "$CHOICE" ]]; then + SCRIPT_PATH="${SCRIPT_MAP[$CHOICE]}" + "$SCRIPT_PATH" +fi diff --git a/install_nvidia_driver b/install_nvidia_driver new file mode 100644 index 0000000..6b5326b --- /dev/null +++ b/install_nvidia_driver @@ -0,0 +1,38 @@ +#!/bin/bash + +# Ensure the script is run as root +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root. Try: sudo $0" + exit 1 +fi + +# Update and upgrade the system +echo "Updating system..." +apt update && apt upgrade -y + +# Install necessary dependencies +echo "Installing required packages..." +apt install -y build-essential dkms linux-headers-$(uname -r) + +# Detect and install NVIDIA driver +echo "Detecting GPU model..." +apt install -y pciutils +GPU_MODEL=$(lspci | grep -i NVIDIA) + +if [[ -z "$GPU_MODEL" ]]; then + echo "No NVIDIA GPU detected. Exiting..." + exit 1 +fi + +echo "Installing NVIDIA driver..." +apt install -y nvidia-driver + +# Reboot prompt +echo "Installation complete! A system reboot is recommended." +read -p "Do you want to reboot now? (y/n) " REBOOT + +if [[ "$REBOOT" == "y" ]]; then + reboot +fi + +exit 0 diff --git a/run_cubic b/run_cubic new file mode 100644 index 0000000..1170940 --- /dev/null +++ b/run_cubic @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +export LANG=en_US.utf8 +LANG=en_US.utf8 + +cubic diff --git a/toolbox b/toolbox new file mode 100644 index 0000000..9109b63 --- /dev/null +++ b/toolbox @@ -0,0 +1,43 @@ +#!/bin/bash + +# Define the folder containing scripts +SCRIPT_DIR="/usr/local/bin" + +# Check if the directory exists +if [[ ! -d "$SCRIPT_DIR" ]]; then + echo "Directory $SCRIPT_DIR does not exist." + exit 1 +fi + +# Get the list of executable scripts +SCRIPTS=($(find "$SCRIPT_DIR" -maxdepth 1 -type f -executable)) + +# Check if there are any scripts +if [[ ${#SCRIPTS[@]} -eq 0 ]]; then + whiptail --msgbox "No executable scripts found in $SCRIPT_DIR." 10 40 + exit 0 +fi + +# Prepare menu options +MENU_OPTIONS=() +declare -A SCRIPT_MAP + +for script in "${SCRIPTS[@]}"; do + # Get base name, remove underscores, and capitalize first letter of each word + DISPLAY_NAME=$(basename "$script" | sed 's/_/ /g' | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2)); print}') + + # Exclude scripts with "Toolbox" in the name + if [[ "$DISPLAY_NAME" != *"Toolbox"* ]]; then + MENU_OPTIONS+=("$DISPLAY_NAME" "") + SCRIPT_MAP["$DISPLAY_NAME"]="$script" + fi +done + +# Show the menu using whiptail with the new title +CHOICE=$(whiptail --title "TyOS Setup Toolbox" --menu "Choose A Script To Run:" 15 50 5 "${MENU_OPTIONS[@]}" 3>&1 1>&2 2>&3) + +# Check if the user made a selection +if [[ -n "$CHOICE" ]]; then + SCRIPT_PATH="${SCRIPT_MAP[$CHOICE]}" + "$SCRIPT_PATH" +fi diff --git a/update_scriptbase b/update_scriptbase new file mode 100644 index 0000000..d32eb9a --- /dev/null +++ b/update_scriptbase @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +echo "> Moving to /usr/local/bin" +cd /usr/local/bin +echo "> Pulling Changes from 'https://git.tyleo.dev/TyleoDvDelaware3217/TyOS-Local-Scripts' repos" +sudo git reset --hard HEAD +sudo git clean -f -d +sudo git pull +echo "> Applying Execution Autorisation to *_*" +sudo find /usr/local/bin -type f -name "[a-z]*" -exec chmod +x {} \; +sudo find /usr/local/bin/flatpacks -type f -name "[a-z]*" -exec chmod +x {} \; \ No newline at end of file diff --git a/update_system_with_apt b/update_system_with_apt new file mode 100644 index 0000000..f0bc93b --- /dev/null +++ b/update_system_with_apt @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +sudo apt update +sudo apt upgrade -y +sudo flatpak update -y \ No newline at end of file diff --git a/update_system_with_nala b/update_system_with_nala new file mode 100644 index 0000000..676046c --- /dev/null +++ b/update_system_with_nala @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +sudo nala update +sudo nala upgrade -y +sudo flatpak update -y