This commit is contained in:
Chris Titus 2024-09-22 14:19:44 -05:00
commit 0029b531ab
27 changed files with 411 additions and 116 deletions

View File

@ -17,7 +17,7 @@ installGithubDesktop() {
"$ESCALATION_TOOL" "$PACKAGER" ref && "$ESCALATION_TOOL" "$PACKAGER" install github-desktop
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm github-desktop
"$AUR_HELPER" -S --needed --noconfirm github-desktop-bin
;;
dnf)
"$ESCALATION_TOOL" rpm --import https://rpm.packages.shiftkey.dev/gpg.key

14
core/tabs/applications-setup/browser-setup.sh Normal file → Executable file
View File

@ -3,8 +3,8 @@
. ../common-script.sh
install_chrome() {
printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}."
if ! command_exists google-chrome; then
printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}."
case "$PACKAGER" in
apt-get|nala)
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
@ -33,8 +33,8 @@ install_chrome() {
}
install_thorium() {
printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}"
if ! command_exists thorium-browser; then
printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list
@ -59,8 +59,8 @@ install_thorium() {
}
install_firefox() {
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
if ! command_exists firefox; then
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
@ -85,8 +85,8 @@ install_firefox() {
}
install_librewolf() {
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
if ! command_exists librewolf; then
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y gnupg lsb-release apt-transport-https ca-certificates
@ -124,8 +124,8 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
}
install_brave() {
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
if ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
@ -173,8 +173,8 @@ install_vivaldi() {
}
install_chromium() {
printf "%b\n" "${YELLOW}Installing Chromium...${RC}"
if ! command_exists chromium; then
printf "%b\n" "${YELLOW}Installing Chromium...${RC}"
case "$PACKAGER" in
apt-get|nala|zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
@ -197,8 +197,8 @@ install_chromium() {
}
install_lynx() {
printf "%b\n" "${YELLOW}Installing Lynx...${RC}"
if ! command_exists lynx; then
printf "%b\n" "${YELLOW}Installing Lynx...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm lynx

View File

@ -0,0 +1,35 @@
#!/bin/sh -e
. ../../common-script.sh
installDiscord() {
if ! command_exists discord; then
printf "%b\n" "${YELLOW}Installing Discord...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -Lo discord.deb "https://discord.com/api/download?platform=linux&format=deb"
"$ESCALATION_TOOL" "$PACKAGER" install -y discord.deb
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install discord
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm discord
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
"$ESCALATION_TOOL" "$PACKAGER" install -y discord
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Discord is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
installDiscord

View File

@ -0,0 +1,36 @@
#!/bin/sh -e
. ../../common-script.sh
installJitsi() {
if ! command_exists jitsi-meet; then
printf "%b\n" "${YELLOW}Installing Jitsi meet...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl https://download.jitsi.org/jitsi-key.gpg.key | "$ESCALATION_TOOL" gpg --dearmor > /usr/share/keyrings/jitsi-keyring.gpg
printf "%b\n" 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/jitsi-stable.list > /dev/null
"$ESCALATION_TOOL" "$PACKAGER" -y install jitsi-meet
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install jitsi
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm jitsi-meet-bin
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y jitsi-meet
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Jitsi meet is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
checkAURHelper
installJitsi

View File

@ -0,0 +1,37 @@
#!/bin/sh -e
. ../../common-script.sh
installSignal() {
if ! command_exists signal; then
printf "%b\n" "${YELLOW}Installing Signal...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -fsSL https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | "$ESCALATION_TOOL" tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
printf "%b\n" 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/signal-xenial.list
"$ESCALATION_TOOL" "$PACKAGER" -y install signal-desktop
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install signal-desktop
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm signal-desktop
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" copr enable luminoso/Signal-Desktop
"$ESCALATION_TOOL" "$PACKAGER" install -y signal-desktop
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Signal is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
installSignal

View File

@ -0,0 +1,25 @@
#!/bin/sh -e
. ../../common-script.sh
installSlack() {
if ! command_exists slack; then
printf "%b\n" "${YELLOW}Installing Slack...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm slack-desktop
;;
*)
. ./setup-flatpak.sh
flatpak install -y flathub com.slack.Slack
;;
esac
else
printf "%b\n" "${GREEN}Slack is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
checkAURHelper
installSlack

View File

@ -0,0 +1,33 @@
#!/bin/sh -e
. ../../common-script.sh
installTelegram() {
if ! command_exists telegram-desktop; then
printf "%b\n" "${YELLOW}Installing Telegram...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" -y install telegram-desktop
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install telegram-desktop
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm telegram-desktop
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y telegram-desktop
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Telegram is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
installTelegram

View File

@ -0,0 +1,33 @@
#!/bin/sh -e
. ../../common-script.sh
installThunderBird() {
if ! command_exists thunderbird; then
printf "%b\n" "${YELLOW}Installing Thunderbird...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" -y install thunderbird
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install thunderbird
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm thunderbird
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y thunderbird
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Thunderbird is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
installThunderBird

View File

@ -0,0 +1,25 @@
#!/bin/sh -e
. ../../common-script.sh
installZoom() {
if ! command_exists zoom; then
printf "%b\n" "${YELLOW}Installing Zoom...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm zoom
;;
*)
. ./setup-flatpak.sh
flatpak install -y flathub us.zoom.Zoom
;;
esac
else
printf "%b\n" "${GREEN}Zoom is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
checkAURHelper
installZoom

View File

@ -9,7 +9,7 @@ choose_installation() {
printf "%b\n" "1. ${YELLOW}Docker${RC}"
printf "%b\n" "2. ${YELLOW}Docker Compose${RC}"
printf "%b\n" "3. ${YELLOW}Both${RC}"
printf "Enter your choice [1-3]: "
printf "%b" "Enter your choice [1-3]: "
read -r CHOICE
case "$CHOICE" in
@ -84,4 +84,4 @@ install_components() {
checkEnv
checkEscalationTool
install_components
install_components

View File

@ -59,4 +59,4 @@ installLinutil() {
checkEnv
checkEscalationTool
checkAURHelper
installLinutil
installLinutil

View File

@ -3,8 +3,8 @@
. ../common-script.sh
install_onlyoffice() {
printf "%b\n" "${YELLOW}Installing Only Office..${RC}."
if ! command_exists onlyoffice-desktopeditors; then
printf "%b\n" "${YELLOW}Installing Only Office..${RC}."
case "$PACKAGER" in
apt-get|nala)
curl -O https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb
@ -28,8 +28,8 @@ install_onlyoffice() {
}
install_libreoffice() {
printf "%b\n" "${YELLOW}Installing Libre Office...${RC}"
if ! command_exists libreoffice; then
printf "%b\n" "${YELLOW}Installing Libre Office...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core
@ -52,8 +52,8 @@ install_libreoffice() {
}
install_wpsoffice() {
printf "%b\n" "${YELLOW}Installing WPS Office...${RC}"
if ! command_exists com.wps.Office; then
printf "%b\n" "${YELLOW}Installing WPS Office...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --noconfirm wps-office
@ -70,8 +70,9 @@ install_wpsoffice() {
# needs to be updated every year for latest version
install_freeoffice() {
printf "%b\n" "${YELLOW}Installing Free Office...${RC}"
case "$PACKAGER" in
if ! command_exists softmaker-freeoffice-2024 freeoffice softmaker; then
printf "%b\n" "${YELLOW}Installing Free Office...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -O https://www.softmaker.net/down/softmaker-freeoffice-2024_1218-01_amd64.deb
"$ESCALATION_TOOL" "$PACKAGER" install -y ./softmaker-freeoffice-2024_1218-01_amd64.deb
@ -92,12 +93,15 @@ install_freeoffice() {
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
esac
else
printf "%b\n" "${GREEN}Free Office is already installed.${RC}"
fi
}
install_evince() {
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
if ! command_exists evince; then
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm evince
@ -112,8 +116,8 @@ install_evince() {
}
install_okular() {
printf "%b\n" "${YELLOW}Installing Evince...${RC}"
if ! command_exists okular; then
printf "%b\n" "${YELLOW}Installing Okular...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm okular
@ -128,8 +132,8 @@ install_okular() {
}
install_pdfstudioviewer() {
printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}"
if ! command_exists pdfstudioviewer2024/pdfstudioviewer2024; then
printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}"
curl -O https://download.qoppa.com/pdfstudioviewer/PDFStudioViewer_linux64.sh
"$ESCALATION_TOOL" chmod +x PDFStudioViewer_linux64.sh
if sh PDFStudioViewer_linux64.sh; then
@ -144,8 +148,8 @@ install_pdfstudioviewer() {
}
install_pdfstudio() {
printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}"
if ! command_exists pdfstudio2024/pdfstudio2024; then
printf "%b\n" "${YELLOW}Installing PDF Studio...${RC}"
curl -O https://download.qoppa.com/pdfstudio/PDFStudio_linux64.sh
"$ESCALATION_TOOL" chmod +x PDFStudio_linux64.sh
if sh PDFStudio_linux64.sh; then
@ -159,7 +163,6 @@ install_pdfstudio() {
fi
}
officeSuiteSetup() {
clear
printf "%b\n" "Office Suite Setup Script"

14
core/tabs/applications-setup/setup-flatpak.sh Normal file → Executable file
View File

@ -25,24 +25,14 @@ setup_flatpak() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm flatpak
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak # Fedora should have flatpak already installed, this is just a failsafe
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
"$ESCALATION_TOOL" "$PACKAGER" install -y flatpak
;;
esac
printf "%b\n" "Adding Flathub remote..."
"$ESCALATION_TOOL" flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
else
if command -v flatpak >/dev/null 2>&1; then
if command_exists flatpak; then
if ! flatpak remotes | grep -q "flathub"; then
printf "%b" "${YELLOW}Detected Flatpak package manager but Flathub remote is not added. Would you like to add it? (y/N): ${RC}"
read -r add_remote

View File

@ -7,101 +7,157 @@ name = "Developer Tools"
name = "Github Desktop"
description = "GitHub Desktop is a user-friendly application that simplifies the process of managing Git repositories and interacting with GitHub, providing a graphical interface for tasks like committing, branching, and syncing changes."
script = "Developer-tools/githubdesktop-setup.sh"
task_list = "installation"
task_list = "I"
[[data.entries]]
name = "Neovim"
description = "Neovim is a refactor, and sometimes redactor, in the tradition of Vim.\nIt is not a rewrite but a continuation and extension of Vim.\nThis command configures neovim from CTT's neovim configuration.\nhttps://github.com/ChrisTitusTech/neovim"
script = "Developer-tools/neovim-setup.sh"
task_list = "installation, file modification"
task_list = "I FM"
[[data.entries]]
name = "Sublime Text"
description = "Sublime Text is a fast, lightweight, and customizable text editor known for its simplicity, powerful features, and wide range of plugins for various programming languages."
script = "Developer-tools/sublime-setup.sh"
task_list = "installation"
task_list = "I"
[[data.entries]]
name = "VS Code"
description = "Visual Studio Code (VS Code) is a lightweight, open-source code editor with built-in support for debugging, version control, and extensions for various programming languages and frameworks."
script = "Developer-tools/vscode-setup.sh"
task_list = "installation"
task_list = "I"
[[data.entries]]
name = "VS Codium"
description = "VSCodium is a free, open-source version of Visual Studio Code (VS Code) that removes Microsoft-specific telemetry and branding."
script = "Developer-tools/vscodium-setup.sh"
task_list = "installation"
task_list = "I"
[[data.entries]]
name = "Meld"
description = "Meld is a visual diff and merge tool that helps compare files, directories, and version-controlled projects."
script = "Developer-tools/meld-setup.sh"
task_list = "installation to ~/meld"
task_list = "I"
[[data.entries]]
name = "Ngrok"
description = "Ngrok is a tool that creates secure, temporary tunnels to expose local servers to the internet for testing and development."
script = "Developer-tools/ngrok-setup.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "Communication Apps"
[[data.entries]]
name = "Discord"
description = "Discord is a versatile communication platform for gamers and communities, offering voice, video, and text chat features."
script = "communication-apps/discord-setup.sh"
task_list = "I"
[[data.entries]]
name = "Jitsi"
description = "Jitsi Meet is an open-source video conferencing tool that allows users to host and join secure meetings directly from their web browsers without the need for downloads."
script = "communication-apps/jitsi-setup.sh"
task_list = "I"
[[data.entries]]
name = "Signal"
description = "Signal is a privacy-focused messaging app that provides end-to-end encryption for secure text, voice, and video communication."
script = "communication-apps/signal-setup.sh"
task_list = "I"
[[data.entries]]
name = "Slack"
description = "Slack is a collaboration platform designed for team communication, featuring channels, direct messaging, file sharing, and integrations with various productivity tools."
script = "communication-apps/slack-setup.sh"
task_list = "I"
[[data.entries]]
name = "Telegram"
description = "Telegram is a cloud-based messaging app known for its speed and security, offering features like group chats, channels, and end-to-end encrypted calls."
script = "communication-apps/telegram-setup.sh"
task_list = "I"
[[data.entries]]
name = "Zoom"
description = "Zoom is a widely-used video conferencing platform that allows users to host virtual meetings, webinars, and online collaboration with features like screen sharing and recording."
script = "communication-apps/zoom-setup.sh"
task_list = "I"
[[data.entries]]
name = "Thunderbird"
description = "Thunderbird is a free, open-source email client that offers powerful features like customizable email management, a built-in calendar, and extensive add-ons for enhanced functionality."
script = "communication-apps/thunderbird-setup.sh"
task_list = "I"
[[data]]
name = "Alacritty"
description = "Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.\nThis command installs and condifures alacritty terminal emulator."
script = "alacritty-setup.sh"
task_list = "installation, file modification"
task_list = "I FM"
[[data]]
name = "Android Debloater"
description = "Universal Android Debloater (UAD) is a tool designed to help users remove bloatware and unnecessary pre-installed applications from Android devices, enhancing performance and user experience."
script = "android-debloat.sh"
task_list = "I"
[[data]]
name = "Bash Prompt"
description = "The .bashrc file is a script that runs every time a new terminal session is started in Unix-like operating systems.\nIt is used to configure the shell session, set up aliases, define functions, and more, making the terminal easier to use and more powerful.\nThis command configures the key sections and functionalities defined in the .bashrc file from CTT's mybash repository.\nhttps://github.com/ChrisTitusTech/mybash"
script = "mybash-setup.sh"
task_list = "installation, file modification"
task_list = "I FM"
[[data]]
name = "Bottles"
script = "bottles-setup.sh"
task_list = "flatpak installation"
task_list = "FI"
[[data]]
name = "Web Browsers"
description = "An interactive script to install popular browsers."
script = "browser-setup.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "DWM-Titus"
description = "DWM is a dynamic window manager for X.\nIt manages windows in tiled, monocle and floating layouts.\nAll of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.\nThis command installs and configures DWM and a desktop manager.\nThe list of patches applied can be found in CTT's DWM repository\nhttps://github.com/ChrisTitusTech/dwm-titus"
script = "dwmtitus-setup.sh"
task_list = "installation, privileged file modification, systemd actions"
task_list = "I PFM SS"
[[data]]
name = "Docker"
script = "docker-setup.sh"
task_list = "I SS"
[[data]]
name = "Fastfetch"
description = "Fastfetch is a neofetch-like tool for fetching system information and displaying it prettily.\nIt is written mainly in C, with performance and customizability in mind.\nThis command installs fastfetch and configures from CTT's mybash repository.\nhttps://github.com/ChrisTitusTech/mybash"
script = "fastfetch-setup.sh"
task_list = "installation, file modification"
task_list = "I FM"
[[data]]
name = "Flatpak / Flathub"
description = "Flatpak is a universal application sandbox for Linux that uses isolated packages from Flathub to prevent conflicts and system alterations, while alleviating dependency concerns.\nThis command installs Flatpak and adds the Flathub repository"
script = "setup-flatpak.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "Grub Theme"
script = "grub-theme.sh"
task_list = "PFM"
[[data]]
name = "Kitty"
description = "kitty is a free and open-source GPU-accelerated terminal emulator for Linux, macOS, and some BSD distributions, focused on performance and features.\nkitty is written in a mix of C and Python programming languages.\n This command installs and configures kitty."
script = "kitty-setup.sh"
task_list = "installation, file modification"
task_list = "I FM"
[[data]]
name = "Linutil Installer"
description = "Installs a distro-specific Linutil package locally."
script = "linutil-installer.sh"
task_list = "installation"
task_list = "I"
[[data.preconditions]]
matches = false
@ -112,6 +168,7 @@ values = [ "linutil" ]
name = "Linutil Updater"
description = "Updates your local Linutil crate installation."
script = "linutil-updater.sh"
task_list = "I"
[[data.preconditions]]
matches = true
@ -122,19 +179,19 @@ values = [ "linutil" ]
name = "Office Suite"
description = "An office suite installer is a software package that installs productivity tools such as word processing, spreadsheets, presentations, and pdf viewers for business and personal use."
script = "office-suite-setup.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "Rofi"
description = "Rofi is a window switcher, run dialog, ssh-launcher and dmenu replacement that started as a clone of simpleswitcher, written by Sean Pringle and later expanded by Dave Davenport.\nThis command installs and configures rofi with configuration from CTT's DWM repo.\nhttps://github.com/ChrisTitusTech/dwm-titus"
script = "rofi-setup.sh"
task_list = "installation, file modification"
task_list = "I FM"
[[data]]
name = "Waydroid"
description = "Waydroid is an emulator that allows you to run Android apps and games on Linux."
script = "waydroid-setup.sh"
task_list = "I SS"
[[data.preconditions]]
matches = true
data = { environment = "XDG_SESSION_TYPE" }
@ -144,4 +201,4 @@ values = [ "wayland", "Wayland" ]
name = "ZSH Prompt"
description = "The Z shell is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.\nThis command installs ZSH prompt and provides basic configuration."
script = "zsh-setup.sh"
task_list = "installation, file modification"
task_list = "I FM"

View File

@ -7,4 +7,4 @@ name = "Diablo II Resurrected"
name = "Loot Filter"
description = "This is a loot filter for Diablo II Resurrected.\nIt's designed to be a simple, clean, and easy to read loot filter that highlights the most important items.\nWorks on battle.net and single player.\nNo frills, no config, just highlights high runes and other valuable items.\nFor more information visit: https://github.com/ChrisTitusTech/d2r-loot-filter"
script = "diablo-ii/d2r-loot-filters.sh"
task_list = "file modification"
task_list = "FM"

View File

@ -4,4 +4,4 @@ name = "Security"
name = "Firewall Baselines (CTT)"
description = "Developed to ease iptables firewall configuration, UFW provides a user friendly way to create an IPv4 or IPv6 host-based firewall.\nThis command installs UFW and configures UFW based on CTT's recommended rules.\nFor more information visit: https://christitus.com/linux-security-mistakes"
script = "firewall-baselines.sh"
task_list = "installation"
task_list = "I SS"

View File

@ -40,7 +40,7 @@ common_cleanup() {
}
clean_data() {
printf "%b\n" "${YELLOW}Clean up old cache files and empty the trash? (y/N): ${RC}"
printf "%b" "${YELLOW}Clean up old cache files and empty the trash? (y/N): ${RC}"
read -r clean_response
case $clean_response in
y|Y)

View File

@ -13,19 +13,19 @@ values = ["pacman"]
name = "Arch Server Setup"
description = "This command installs a minimal arch server setup under 5 minutes."
script = "arch/server-setup.sh"
task_list = "full system installation, including partitioning"
task_list = "SI D"
[[data.entries]]
name = "Paru AUR Helper"
description = "Paru is your standard pacman wrapping AUR helper with lots of features and minimal interaction.\nTo know more about AUR helpers visit: https://wiki.archlinux.org/title/AUR_helpers"
script = "arch/paru-setup.sh"
task_list = "installation"
task_list = "I"
[[data.entries]]
name = "Yay AUR Helper"
description = "Yet Another Yogurt - An AUR Helper Written in Go.\nTo know more about AUR helpers visit: https://wiki.archlinux.org/title/AUR_helpers"
script = "arch/yay-setup.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "Fedora"
@ -39,81 +39,61 @@ values = ["dnf"]
name = "Configure DNF"
description = "Optimizes DNF for parallel downloads"
script = "fedora/configure-dnf.sh"
task_list = "privileged file modification"
task_list = "PFM"
[[data.entries]]
name = "Multimedia Codecs"
script = "fedora/multimedia-codecs.sh"
task_list = "installation"
task_list = "I"
[[data.entries]]
name = "Nvidia Proprietary Drivers"
script = "fedora/nvidia-proprietary-driver-setup.sh"
task_list = "installation"
task_list = "I"
[[data.entries]]
name = "RPM Fusion"
description = "RPM Fusion provides software that the Fedora Project or Red Hat doesn't want to ship.\nThat software is provided as precompiled RPMs for all current Fedora versions and current Red Hat Enterprise Linux or clones versions; you can use the RPM Fusion repositories with tools like yum and PackageKit.\nFor more information visit: https://rpmfusion.org/"
script = "fedora/rpm-fusion-setup.sh"
task_list = "repo installation"
task_list = "MP"
[[data.entries]]
name = "Virtualization"
description = "Enables Virtualization through dnf"
script = "fedora/virtualization.sh"
task_list = "installation"
[[data]]
name = "Auto Mount Drive"
script = "auto-mount.sh"
task_list = "privileged file modification"
task_list = "I"
[[data]]
name = "Build Prerequisites"
description = "This script is designed to handle the installation of various software dependencies across different Linux distributions"
script = "compile-setup.sh"
task_list = "installation"
[[data]]
name = "Docker"
script = "docker-setup.sh"
task_list = "installation, systemd actions"
task_list = "I"
[[data]]
name = "Full System Cleanup"
script = "system-cleanup.sh"
task_list = "package removal, privileged file modification"
task_list = "RP PFM"
[[data]]
name = "Full System Update"
description = "This command updates your system to the latest packages available for your distro"
script = "system-update.sh"
task_list = "privileged file modification"
task_list = "PFM"
[[data]]
name = "Gaming Dependencies"
description = "This script is designed to handle the installation of gaming dependencies across different Linux distributions"
script = "gaming-setup.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "Global Theme"
description = "This script is designed to handle the installation and configuration of global theming"
script = "global-theme.sh"
task_list = "installation, privileged file modification"
[[data]]
name = "Grub Theme"
script = "grub-theme.sh"
task_list = "privileged file modification"
task_list = "I PFM"
[[data]]
name = "Remove Snaps"
description = "This script is designed to remove snap"
script = "remove-snaps.sh"
task_list = "package removal"
[[data]]
name = "SSH-Samba"
script = "samba-ssh-setup.sh"
task_list = "installation, systemd actions, privileged file modification"
task_list = "RP"

View File

@ -68,16 +68,16 @@ setup_samba() {
if [ -f "$SAMBA_CONFIG" ]; then
printf "%b\n" "${YELLOW}Samba configuration file already exists in $SAMBA_CONFIG.${RC}"
printf "Do you want to modify the existing Samba configuration? (yes/no): "
printf "%b" "Do you want to modify the existing Samba configuration? (Y/n): "
read -r MODIFY_SAMBA
if [ "$MODIFY_SAMBA" = "yes" ]; then
if [ "$MODIFY_SAMBA" = "Y" ] || [ "$MODIFY_SAMBA" = "y" ]; then
"$ESCALATION_TOOL" "$EDITOR" "$SAMBA_CONFIG"
fi
else
printf "%b\n" "${YELLOW}No existing Samba configuration found. Setting up a new one...${RC}"
# Prompt user for shared directory path
printf "Enter the path for the Samba share (default: /srv/samba/share): "
printf "%b" "Enter the path for the Samba share (default: /srv/samba/share): "
read -r SHARED_DIR
SHARED_DIR=${SHARED_DIR:-/srv/samba/share}
@ -86,7 +86,7 @@ setup_samba() {
"$ESCALATION_TOOL" chmod -R 0777 "$SHARED_DIR"
# Add a new Samba user
printf "Enter Samba username: "
printf "%b" "Enter Samba username: "
read -r SAMBA_USER
# Loop until the passwords match
@ -97,7 +97,7 @@ setup_samba() {
stty echo
printf "Confirm Samba password: "
stty -echo
read SAMBA_PASSWORD_CONFIRM
read -r SAMBA_PASSWORD_CONFIRM
stty echo
printf "\n"
if [ "$SAMBA_PASSWORD" = "$SAMBA_PASSWORD_CONFIRM" ]; then
@ -163,12 +163,12 @@ setup_ssh_samba(){
clear
# Display menu
printf "Select an option:\n"
printf "1. Setup SSH\n"
printf "2. Setup Samba\n"
printf "3. Configure Firewall\n"
printf "4. Setup All\n"
printf "5. Exit\n"
printf "%b\n" "Select an option:"
printf "%b\n" "1. Setup SSH"
printf "%b\n" "2. Setup Samba"
printf "%b\n" "3. Configure Firewall"
printf "%b\n" "4. Setup All"
printf "%b\n" "5. Exit"
printf "%b" "Enter your choice (1-5): "
read CHOICE
@ -203,4 +203,4 @@ setup_ssh_samba(){
checkEnv
checkEscalationTool
setup_ssh_samba
setup_ssh_samba

View File

@ -19,6 +19,11 @@ name = "Auto Detect Displays"
description = "This utility is designed to detect and apply recommended configuration for monitors connected with your system"
script = "monitor-control/auto_detect_displays.sh"
[[data]]
name = "Auto Mount Drive"
script = "auto-mount.sh"
task_list = "PFM"
[[data.entries]]
name = "Change Orientation"
description = "This utility is designed to change the orientation of monitors in your system"
@ -55,6 +60,11 @@ description = "This utility is designed to reset scaling of a monitor in your sy
script = "monitor-control/reset_scaling.sh"
matches = true
[[data]]
name = "SSH-Samba"
script = "samba-ssh-setup.sh"
task_list = "I SS PFM"
[[data.entries]]
name = "Scale Monitors"
description = "This utility is designed to change the scaling of monitors in your system"
@ -101,54 +111,54 @@ task_list = "DE setup"
[[data]]
name = "Auto Power Profiling"
script = "power-profile.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "Bluetooth Manager"
description = "This utility is designed to manage bluetooth in your system"
script = "bluetooth-control.sh"
task_list = "installation, systemd actions"
task_list = "I SS"
[[data]]
name = "Bootable USB Creator"
script = "create-bootable-usb.sh"
task_list = "disk modification"
task_list = "D"
[[data]]
name = "Crypto tool"
script = "encrypt_decrypt_tool.sh"
task_list = "installation, file modification"
task_list = "I FM"
[[data]]
name = "Numlock on Startup"
description = "This utility is designed to configure auto enabling of numlock on boot"
script = "numlock.sh"
task_list = "privileged file modification, systemd actions"
task_list = "PFM SS"
[[data]]
name = "Ollama"
description = "This utility is designed to manage ollama in your system"
script = "ollama.sh"
task_list = "installation, systemd actions"
task_list = "I SS"
[[data]]
name = "Service Manager"
description = "This utility is designed to manage services in your system"
script = "service-control.sh"
task_list = "installation, privileged file modification, systemd actions"
task_list = "I PFM SS"
[[data]]
name = "SSH Commands"
script = "ssh.sh"
task_list = "installation, file modification, systemd actions"
task_list = "I FM SS"
[[data]]
name = "Timeshift Backup"
script = "timeshift.sh"
task_list = "installation"
task_list = "I"
[[data]]
name = "WiFi Manager"
description = "This utility is designed to manage wifi in your system"
script = "wifi-control.sh"
task_list = "installation, systemd actions"
task_list = "I SS"

View File

@ -56,7 +56,11 @@ impl Float {
// Returns true if the floating window is finished.
pub fn handle_key_event(&mut self, key: &KeyEvent) -> bool {
match key.code {
KeyCode::Enter | KeyCode::Char('p') | KeyCode::Char('d') | KeyCode::Esc
KeyCode::Enter
| KeyCode::Char('p')
| KeyCode::Char('d')
| KeyCode::Char('g')
| KeyCode::Esc
if self.content.is_finished() =>
{
true

View File

@ -30,6 +30,7 @@ use zips::zip_result;
pub enum FloatingTextMode {
Preview,
Description,
ActionsGuide,
}
pub struct FloatingText {
@ -182,6 +183,7 @@ impl FloatingText {
match mode {
FloatingTextMode::Preview => "Command Preview",
FloatingTextMode::Description => "Command Description",
FloatingTextMode::ActionsGuide => "Important Actions Guide",
}
}
@ -299,7 +301,7 @@ impl FloatContent for FloatingText {
Shortcut::new(vec!["k", "Up"], "Scroll up"),
Shortcut::new(vec!["h", "Left"], "Scroll left"),
Shortcut::new(vec!["l", "Right"], "Scroll right"),
Shortcut::new(vec!["Enter", "p", "d"], "Close window"),
Shortcut::new(vec!["Enter", "p", "d", "g"], "Close window"),
],
}
}

View File

@ -144,6 +144,7 @@ pub fn draw_shortcuts(state: &AppState, frame: &mut Frame, area: Rect) {
}
hints.push(Shortcut::new(vec!["Tab"], "Next tab"));
hints.push(Shortcut::new(vec!["Shift-Tab"], "Previous tab"));
hints.push(Shortcut::new(vec!["g"], "Important actions guide"));
ShortcutList {
scope_name: "Command list",
hints,

View File

@ -161,6 +161,7 @@ impl RunningCommand {
script.push(' ');
script.push_str(&arg);
}
script.push('\n'); // Ensures that each command is properly separated for execution preventing directory errors
}
Command::None => panic!("Command::None was treated as a command"),
}

View File

@ -22,6 +22,19 @@ use ratatui::{
const MIN_WIDTH: u16 = 77;
const MIN_HEIGHT: u16 = 19;
const TITLE: &str = concat!("Linux Toolbox - ", env!("BUILD_DATE"));
const ACTIONS_GUIDE: &str = "List of important tasks performed by commands' names:
D - disk modifications (ex. partitioning) (privileged)
FI - flatpak installation
FM - file modification
I - installation (privileged)
MP - package manager actions
SI - full system installation
SS - systemd actions (privileged)
RP - package removal
P* - privileged *
";
pub struct AppState {
/// Selected theme
@ -188,7 +201,7 @@ impl AppState {
let list_chunks = Layout::default()
.direction(Direction::Horizontal)
.constraints([Constraint::Percentage(60), Constraint::Percentage(40)].as_ref())
.constraints([Constraint::Percentage(70), Constraint::Percentage(30)].as_ref())
.split(chunks[1]);
self.filter.draw_searchbar(frame, chunks[0], &self.theme);
@ -365,6 +378,7 @@ impl AppState {
KeyCode::Char('/') => self.enter_search(),
KeyCode::Char('t') => self.theme.next(),
KeyCode::Char('T') => self.theme.prev(),
KeyCode::Char('g') => self.toggle_task_list_guide(),
_ => {}
},
Focus::List if key.kind != KeyEventKind::Release => match key.code {
@ -383,6 +397,7 @@ impl AppState {
KeyCode::Char('/') => self.enter_search(),
KeyCode::Char('t') => self.theme.next(),
KeyCode::Char('T') => self.theme.prev(),
KeyCode::Char('g') => self.toggle_task_list_guide(),
KeyCode::Char('v') | KeyCode::Char('V') => self.toggle_multi_select(),
KeyCode::Char(' ') if self.multi_select => self.toggle_selection(),
_ => {}
@ -558,6 +573,14 @@ impl AppState {
self.selection.select(Some(0));
self.update_items();
}
fn toggle_task_list_guide(&mut self) {
self.spawn_float(
FloatingText::new(ACTIONS_GUIDE.to_string(), FloatingTextMode::ActionsGuide),
80,
80,
);
}
}
#[cfg(feature = "tips")]