diff --git a/core/tabs/applications-setup/browsers/helium-browser.sh b/core/tabs/applications-setup/browsers/helium-browser.sh new file mode 100755 index 000000000..84086845b --- /dev/null +++ b/core/tabs/applications-setup/browsers/helium-browser.sh @@ -0,0 +1,69 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installHeliumBrowser() { + if ! command_exists Helium && ! command_exists helium; then + printf "%b\n" "${YELLOW}Installing Helium Browser...${RC}" + case "$PACKAGER" in + pacman) + "$AUR_HELPER" -S --needed --noconfirm helium-browser-bin + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" copr enable imput/helium + "$ESCALATION_TOOL" "$PACKAGER" install -y helium-bin + ;; + nala | apt-get) + "$ESCALATION_TOOL" "$PACKAGER" install -y curl + curl -fsSL https://raw.githubusercontent.com/imputnet/helium-linux/main/pubkey.asc | "$ESCALATION_TOOL" gpg --dearmor -o /usr/share/keyrings/helium.gpg + echo "deb [signed-by=/usr/share/keyrings/helium.gpg] https://pkg.helium.computer/deb stable main" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/helium.list + "$ESCALATION_TOOL" "$PACKAGER" update + "$ESCALATION_TOOL" "$PACKAGER" install -y helium-bin + ;; + *) + printf "%b\n" "${RED}Helium doesn't support ${PACKAGER}${RC}" + ;; + esac + else + printf "%b\n" "${GREEN}Helium Browser is already installed.${RC}" + fi +} + +uninstallHeliumBrowser() { + if command_exists Helium || command_exists helium; then + printf "%b\n" "${YELLOW}Removing Helium Browser...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -R --noconfirm helium-browser-bin + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" remove -y helium-bin + "$ESCALATION_TOOL" "$PACKAGER" copr disable imput/helium + ;; + nala | apt-get) + [ -f "/usr/share/keyrings/helium.gpg" ] && "$ESCALATION_TOOL" rm "/usr/share/keyrings/helium.gpg" + [ -f "/etc/apt/sources.list.d/helium.list" ] && "$ESCALATION_TOOL" rm "/etc/apt/sources.list.d/helium.list" + "$ESCALATION_TOOL" "$PACKAGER" update + "$ESCALATION_TOOL" "$PACKAGER" purge -y helium-bin + ;; + esac + else + printf "%b\n" "${GREEN}Helium Browser is not installed.${RC}" + fi +} + +main() { + printf "%b\n" "${YELLOW}Do you want to Install or Uninstall Helium Browser?${RC}" + printf "%b\n" "1. ${YELLOW}Install Helium Browser${RC}" + printf "%b\n" "2. ${YELLOW}Uninstall Helium Browser${RC}" + printf "%b" "Enter your choice [1-2]: " + read -r CHOICE + case "$CHOICE" in + 1) installHeliumBrowser ;; + 2) uninstallHeliumBrowser ;; + *) printf "%b\n" "${RED}Invalid choice.${RC}" && exit 1 ;; + esac +} + +checkEnv +main diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index 4afb9531b..43a6a2750 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -339,6 +339,12 @@ description = "Zen Browser is a privacy-focused web browser designed for enhance script = "browsers/zen-browser.sh" task_list = "I" +[[data.entries]] +name = "Helium Browser" +description = "Helium Browser is a free, privacy-focused and open-source chromium-based browser designed for enhanced security and a seamless browsing experience." +script = "browsers/helium-browser.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. This command installs and configures alacritty terminal emulator."