From b8a454fa923ce1bf5757d63f88bb7f79425ced52 Mon Sep 17 00:00:00 2001 From: "harshv5094 (personal PC)" Date: Wed, 16 Oct 2024 10:20:30 +0530 Subject: [PATCH 1/2] feat(communication/whatsapp): add whatsapp desktop client --- .../communication-apps/whatsapp-setup.sh | 30 +++++++++++++++++++ core/tabs/applications-setup/tab_data.toml | 12 ++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 core/tabs/applications-setup/communication-apps/whatsapp-setup.sh diff --git a/core/tabs/applications-setup/communication-apps/whatsapp-setup.sh b/core/tabs/applications-setup/communication-apps/whatsapp-setup.sh new file mode 100644 index 00000000..3ebed1e0 --- /dev/null +++ b/core/tabs/applications-setup/communication-apps/whatsapp-setup.sh @@ -0,0 +1,30 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installWhatsapp() { + printf "%b\n" "${YELLOW}The app we are installing is Zap-Zap, an Open Source Desktop Client for Linux${RC}" + case "$PACKAGER" in + pacman) + if ! command_exists zapzap; then + printf "%b\n" "${YELLOW}Installing Whatsapp(Zap-Zap by rtosta) AUR PACKAGE${RC}" + "$AUR_HELPER" -S --needed --noconfirm zapzap + printf "%b\n" "${GREEN}WhatsApp(Zap-Zap by rtosta) is installed. Search ZapZap to start WhatsApp${RC}" + return + else + printf "%b\n" "${GREEN}Whatsapp(Zap-Zap by rtosta) is already installed${RC}" + return + fi + ;; + *) + . ../setup-flatpak.sh + printf "%b\n" "${YELLOW} Installing Whatsapp(Zap-Zap by rtosta) Flatpak ${RC}" + flatpak install flathub com.rtosta.zapzap + printf "%b\n" "${GREEN}WhatsApp(Zap-Zap by rtosta) is installed. Search ZapZap to start WhatsApp${RC}" + return + ;; + esac +} + +checkEnv +installWhatsapp diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index ef6af7de..5d7e0302 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -78,6 +78,12 @@ description = "Telegram is a cloud-based messaging app known for its speed and s script = "communication-apps/telegram-setup.sh" task_list = "I" +[[data.entries]] +name = "WhatsApp" +description = "WhatsApp 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/whatsapp-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." @@ -255,7 +261,7 @@ task_list = "I" [[data.preconditions]] matches = false data = "command_exists" -values = [ "linutil" ] +values = ["linutil"] [[data]] name = "Linutil Updater" @@ -266,7 +272,7 @@ task_list = "I" [[data.preconditions]] matches = true data = "command_exists" -values = [ "linutil" ] +values = ["linutil"] [[data]] name = "Rofi" @@ -282,7 +288,7 @@ task_list = "I SS" [[data.preconditions]] matches = true data = { environment = "XDG_SESSION_TYPE" } -values = [ "wayland", "Wayland" ] +values = ["wayland", "Wayland"] [[data]] name = "ZSH Prompt" From 09aea49b2c031c1b81f3c7fbc6e4f4a60433ec00 Mon Sep 17 00:00:00 2001 From: Harsh Vyapari Date: Sun, 20 Oct 2024 17:57:44 +0530 Subject: [PATCH 2/2] Update core/tabs/applications-setup/communication-apps/whatsapp-setup.sh Co-authored-by: JEEVITHA KANNAN K S --- .../communication-apps/whatsapp-setup.sh | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/core/tabs/applications-setup/communication-apps/whatsapp-setup.sh b/core/tabs/applications-setup/communication-apps/whatsapp-setup.sh index 3ebed1e0..0ec201ce 100644 --- a/core/tabs/applications-setup/communication-apps/whatsapp-setup.sh +++ b/core/tabs/applications-setup/communication-apps/whatsapp-setup.sh @@ -4,26 +4,20 @@ installWhatsapp() { printf "%b\n" "${YELLOW}The app we are installing is Zap-Zap, an Open Source Desktop Client for Linux${RC}" - case "$PACKAGER" in - pacman) - if ! command_exists zapzap; then - printf "%b\n" "${YELLOW}Installing Whatsapp(Zap-Zap by rtosta) AUR PACKAGE${RC}" - "$AUR_HELPER" -S --needed --noconfirm zapzap - printf "%b\n" "${GREEN}WhatsApp(Zap-Zap by rtosta) is installed. Search ZapZap to start WhatsApp${RC}" - return - else - printf "%b\n" "${GREEN}Whatsapp(Zap-Zap by rtosta) is already installed${RC}" - return - fi - ;; - *) - . ../setup-flatpak.sh - printf "%b\n" "${YELLOW} Installing Whatsapp(Zap-Zap by rtosta) Flatpak ${RC}" - flatpak install flathub com.rtosta.zapzap - printf "%b\n" "${GREEN}WhatsApp(Zap-Zap by rtosta) is installed. Search ZapZap to start WhatsApp${RC}" - return - ;; - esac + if ! command_exists com.rtosta.zapzap && ! command_exists zapzap; then + printf "%b\n" "${YELLOW}Installing Whatsapp(Zap-Zap by rtosta)${RC}" + case "$PACKAGER" in + pacman) + "$AUR_HELPER" -S --needed --noconfirm zapzap + ;; + *) + . ../setup-flatpak.sh + flatpak install flathub com.rtosta.zapzap + ;; + esac + else + printf "%b\n" "${GREEN}WhatsApp(Zap-Zap by rtosta) is already installed.${RC}" + fi } checkEnv