Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion core/tabs/applications-setup/browsers/brave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,40 @@
installBrave() {
if ! command_exists com.brave.Browser && ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
curl -fsS https://dl.brave.com/install.sh | sh
case "$PACKAGER" in
apt-get|nala)
if [ "$DTYPE" = "ubuntu" ] && command_exists snap; then
"$ESCALATION_TOOL" snap install brave
else
"$ESCALATION_TOOL" curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
"$ESCALATION_TOOL" curl -fsSLo /etc/apt/sources.list.d/brave-browser-release.sources https://brave-browser-apt-release.s3.brave.com/brave-browser.sources
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
fi
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core
if command_exists dnf5; then
"$ESCALATION_TOOL" dnf5 config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
fi
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
"$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys refresh
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm brave-bin
;;
*)
checkFlatpak
"$ESCALATION_TOOL" flatpak install --noninteractive flathub com.brave.Browser 2>/dev/null || \
curl -fsS https://dl.brave.com/install.sh | sh
;;
esac
else
printf "%b\n" "${GREEN}Brave Browser is already installed.${RC}"
fi
Expand Down
9 changes: 8 additions & 1 deletion core/tabs/applications-setup/browsers/chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ if ! command_exists chromium; then
xbps-install)
"$ESCALATION_TOOL" "$PACKAGER" -Sy chromium
;;
apt-get|nala|zypper|dnf|eopkg)
apt-get|nala)
if [ "$DTYPE" = "ubuntu" ] && command_exists snap; then
"$ESCALATION_TOOL" snap install chromium
else
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
fi
;;
zypper|dnf|eopkg)
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
;;
*)
Expand Down
33 changes: 32 additions & 1 deletion core/tabs/applications-setup/browsers/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,43 @@

. ../../common-script.sh

setupMozillaRepo() {
"$ESCALATION_TOOL" install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://packages.mozilla.org/apt/repo-signing-key.gpg -o /tmp/mozilla-key.gpg
"$ESCALATION_TOOL" gpg --batch --yes --dearmor -o /etc/apt/keyrings/packages.mozilla.org.gpg /tmp/mozilla-key.gpg 2>/dev/null || {
"$ESCALATION_TOOL" cp /tmp/mozilla-key.gpg /etc/apt/keyrings/packages.mozilla.org.asc
}
rm -f /tmp/mozilla-key.gpg

"$ESCALATION_TOOL" tee /etc/apt/sources.list.d/mozilla.sources > /dev/null << 'EOF'
Types: deb
URIs: https://packages.mozilla.org/apt
Suites: mozilla
Components: main
Signed-By: /etc/apt/keyrings/packages.mozilla.org.gpg

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point Signed-By at the fallback key file

If gpg is missing or --dearmor fails, the fallback copies the downloaded key to packages.mozilla.org.asc, but the source stanza still uses Signed-By: /etc/apt/keyrings/packages.mozilla.org.gpg. On those Ubuntu installs apt update will fail because the referenced key file was never created; either ensure gpg is installed or make the stanza reference the actual fallback file.

Useful? React with 👍 / 👎.

EOF

"$ESCALATION_TOOL" tee /etc/apt/preferences.d/mozilla > /dev/null << 'EOF'
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
EOF
}

installFirefox() {
if ! command_exists firefox; then
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
case "$PACKAGER" in
apt-get|nala)
if [ "$DTYPE" != "ubuntu" ]; then
if [ "$DTYPE" = "ubuntu" ]; then
if command_exists snap && snap list firefox 2>/dev/null | grep -q firefox; then
printf "%b\n" "${YELLOW}Removing Snap Firefox...${RC}"
"$ESCALATION_TOOL" snap remove firefox
Comment on lines +34 to +36

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace snap Firefox before the generic installed check

On Ubuntu systems that already have the default Firefox snap, firefox is usually on PATH, so the outer if ! command_exists firefox sends execution to the "already installed" branch before this snap-removal block can run. In that common case the script never removes the snap or installs the Mozilla APT package, which defeats the new Ubuntu behavior added here.

Useful? React with 👍 / 👎.

fi
setupMozillaRepo
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox
else
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
fi
;;
Expand Down
32 changes: 12 additions & 20 deletions core/tabs/applications-setup/browsers/google-chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ installChrome() {
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
"$ESCALATION_TOOL" "$PACKAGER" install -y ./google-chrome-stable_current_amd64.deb
"$ESCALATION_TOOL" rm ./google-chrome-stable_current_amd64.deb
"$ESCALATION_TOOL" "$PACKAGER" install -y wget ca-certificates
wget -O /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
"$ESCALATION_TOOL" "$PACKAGER" install -y /tmp/google-chrome.deb
rm -f /tmp/google-chrome.deb
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome
Expand Down Expand Up @@ -39,13 +40,13 @@ uninstallChrome() {
printf "%b\n" "${YELLOW}Uninstalling Google Chrome...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" purge --autoremove -y google-chrome
"$ESCALATION_TOOL" "$PACKAGER" purge --autoremove -y google-chrome-stable
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive uninstall google-chrome-stable
;;
pacman)
"$AUR_HELPER" -Rns --needed --noconfirm google-chrome
"$AUR_HELPER" -Rns --noconfirm google-chrome
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" remove -y google-chrome-stable
Expand All @@ -55,38 +56,29 @@ uninstallChrome() {
;;
esac
else
printf "%b\n" "${GREEN}Google Chrome Browser is already installed.${RC}"
printf "%b\n" "${GREEN}Google Chrome Browser is not installed.${RC}"
fi
}

removeLocalAI() {
# Set Chrome AI path
CHROME_USER_DIR="$HOME/.config/google-chrome"

# Path where Chrome AI model is stored
AI_MODEL_DIR="$CHROME_USER_DIR/AI"

# Remove AI model if it exists
if [ -d "$AI_MODEL_DIR" ]; then
echo "Removing existing Chrome AI model..."
printf "%b\n" "${YELLOW}Removing existing Chrome AI model...${RC}"
rm -rf "$AI_MODEL_DIR"
echo "Removed AI model."
printf "%b\n" "${GREEN}AI model removed.${RC}"
else
echo "No AI model found at $AI_MODEL_DIR"
printf "%b\n" "${GREEN}No AI model found.${RC}"
fi

# Prevent re-download
# Create an empty directory and make it read-only
echo "Creating read-only placeholder to block AI download..."
mkdir -p "$AI_MODEL_DIR"
chmod 000 "$AI_MODEL_DIR"

echo "Chrome AI model removed and blocked from redownloading."
printf "%b\n" "${YELLOW}AI download blocked (read-only placeholder created).${RC}"
}


main() {
printf "%b\n" "${YELLOW}Do you want to Install or Uninstall Chrome${RC}"
printf "%b\n" "${YELLOW}Do you want to Install or Uninstall Chrome${RC}"
printf "%b\n" "1. ${YELLOW}Install Chrome${RC}"
printf "%b\n" "2. ${YELLOW}Uninstall Chrome${RC}"
printf "%b\n" "3. ${YELLOW}Remove Local AI (Prevents Chrome From Reinstalling)${RC}"
Expand Down
8 changes: 4 additions & 4 deletions core/tabs/applications-setup/browsers/lynx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ installLynx() {
apt-get|nala|zypper|dnf|eopkg)
"$ESCALATION_TOOL" "$PACKAGER" install -y lynx
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Lynx TUI Browser is already installed.${RC}"
Expand Down
6 changes: 3 additions & 3 deletions core/tabs/applications-setup/browsers/thorium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

. ../../common-script.sh

installThrorium() {
installThorium() {
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
"$ESCALATION_TOOL" curl http://dl.thorium.rocks/debian/dists/stable/thorium.list -o /etc/apt/sources.list.d/thorium.list
"$ESCALATION_TOOL" wget --no-hsts -P /etc/apt/sources.list.d/ http://dl.thorium.rocks/debian/dists/stable/thorium.list

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check or install wget before using it

In the apt/nala path this now calls wget, but checkEnv only requires curl and this branch does not install or validate wget first. Minimal Debian/Ubuntu environments that lack wget will abort here before the Thorium repo is added, so use the already-required curl or install/check wget before this command.

Useful? React with 👍 / 👎.

"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y thorium-browser
;;
Expand Down Expand Up @@ -53,4 +53,4 @@ installThrorium() {
}

checkEnv
installThrorium
installThorium
6 changes: 5 additions & 1 deletion core/tabs/applications-setup/browsers/vivaldi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ installVivaldi() {
printf "%b\n" "${YELLOW}Installing Vivaldi...${RC}"
case "$PACKAGER" in
apt-get|nala)
if [ "$DTYPE" = "ubuntu" ] && command_exists snap; then
"$ESCALATION_TOOL" snap install vivaldi
else
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg
"$ESCALATION_TOOL" echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" | sudo dd of=/etc/apt/sources.list.d/vivaldi-archive.list
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y vivaldi-stable
;;
fi
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
Expand Down
4 changes: 4 additions & 0 deletions core/tabs/applications-setup/browsers/waterfox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ installWaterfox() {
if ! command_exists net.waterfox.waterfox && ! command_exists waterfox; then
printf "%b\n" "${YELLOW}Installing waterfox...${RC}"
case "$PACKAGER" in
apt-get|nala)
checkFlatpak
"$ESCALATION_TOOL" flatpak install --noninteractive flathub net.waterfox.waterfox
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm waterfox-bin
;;
Expand Down
22 changes: 15 additions & 7 deletions core/tabs/applications-setup/browsers/zen-browser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ installZenBrowser() {
if ! command_exists io.github.zen_browser.zen && ! command_exists zen-browser; then
printf "%b\n" "${YELLOW}Installing Zen Browser...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm zen-browser-bin
;;
*)
checkFlatpak
"$ESCALATION_TOOL" flatpak install --noninteractive flathub io.github.zen_browser.zen
;;
apt-get|nala)
if [ "$DTYPE" = "ubuntu" ] && command_exists snap; then
"$ESCALATION_TOOL" snap install zen-browser-snap --candidate
else
checkFlatpak
"$ESCALATION_TOOL" flatpak install --noninteractive flathub io.github.zen_browser.zen
fi
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm zen-browser-bin
;;
*)
checkFlatpak
"$ESCALATION_TOOL" flatpak install --noninteractive flathub io.github.zen_browser.zen
;;
esac
else
printf "%b\n" "${GREEN}Zen Browser is already installed.${RC}"
Expand Down
9 changes: 9 additions & 0 deletions core/tabs/common-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ checkCurrentDirectoryWritable() {
fi
}

checkSnap() {
if ! command_exists snap; then
printf "%b\n" "${YELLOW}Snap is not available on this system.${RC}"
return 1
fi
printf "%b\n" "${CYAN}Snap is available${RC}"
return 0
}

checkDistro() {
DTYPE="unknown" # Default to unknown
# Use /etc/os-release for modern distro identification
Expand Down
41 changes: 41 additions & 0 deletions core/tabs/system-setup/arch/pacman-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh -e

. ../../common-script.sh

configurePacman() {
conf="/etc/pacman.conf"

if [ ! -f "$conf" ]; then
printf "%b\n" "${RED}${conf} not found.${RC}"
exit 1
fi

"$ESCALATION_TOOL" sed -i 's/^#Color/Color/' "$conf"
"$ESCALATION_TOOL" sed -i '/^Color/a ILoveCandy' "$conf"
"$ESCALATION_TOOL" sed -i 's/^#VerbosePkgLists/VerbosePkgLists/' "$conf"
"$ESCALATION_TOOL" sed -i 's/^#ParallelDownloads/ParallelDownloads/' "$conf"
if ! grep -q "^ParallelDownloads" "$conf"; then
printf "%b\n" "${YELLOW}Adding ParallelDownloads...${RC}"
"$ESCALATION_TOOL" sed -i '/^#ParallelDownloads/a ParallelDownloads = 5' "$conf"
fi
"$ESCALATION_TOOL" sed -i "/\[multilib\]/,/Include/"'s/^#//' "$conf"

printf "%b\n" "${GREEN}pacman.conf configured: Color, ILoveCandy, VerbosePkgLists, ParallelDownloads=5, multilib enabled.${RC}"
}

configureMakepkg() {
conf="/etc/makepkg.conf"

cores=$(nproc)
"$ESCALATION_TOOL" sed -i "s/^#MAKEFLAGS=\"-j[0-9]*\"/MAKEFLAGS=\"-j${cores}\"/" "$conf"
"$ESCALATION_TOOL" sed -i "s/^MAKEFLAGS=\"-j[0-9]*\"/MAKEFLAGS=\"-j${cores}\"/" "$conf"
if ! grep -q "^MAKEFLAGS" "$conf"; then
printf "%b\n" "${YELLOW}Adding MAKEFLAGS...${RC}"
printf "MAKEFLAGS=\"-j%s\"\n" "$cores" | "$ESCALATION_TOOL" tee -a "$conf" > /dev/null
fi
printf "%b\n" "${GREEN}MAKEFLAGS set to -j${cores} in makepkg.conf${RC}"
}

checkEnv
configurePacman
configureMakepkg
17 changes: 17 additions & 0 deletions core/tabs/system-setup/arch/pipewire-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh -e

. ../../common-script.sh

installPipewire() {
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber lib32-pipewire

if command_exists systemctl; then
systemctl --user enable --now pipewire.service pipewire-pulse.service wireplumber.service 2>/dev/null || true
printf "%b\n" "${GREEN}PipeWire services enabled.${RC}"
fi

printf "%b\n" "${GREEN}PipeWire with WirePlumber installed. Reboot or relogin to apply.${RC}"
}

checkEnv
installPipewire
Loading
Loading