From 8570d7759a86e73a0a29b18436208d5892fbf4e2 Mon Sep 17 00:00:00 2001 From: Fernando <33039864+tuxslack@users.noreply.github.com> Date: Sun, 19 Jan 2025 13:55:16 -0300 Subject: [PATCH 1/7] Update install.sh * Added check for Picom issue. --- Arian Theme Light/install.sh | 142 +++++++++++++++++++++++++++++++++-- 1 file changed, 137 insertions(+), 5 deletions(-) diff --git a/Arian Theme Light/install.sh b/Arian Theme Light/install.sh index 58000e4..2cca90f 100644 --- a/Arian Theme Light/install.sh +++ b/Arian Theme Light/install.sh @@ -1,4 +1,125 @@ #!/bin/bash +# +# +# Author: Arian Hosseini - https://github.com/arianXdev +# Collaboration: Fernando Souza - https://www.youtube.com/@fernandosuporte/ | https://github.com/tuxslack +# Date: 19/01/2025 +# Script: ~/.local/share/plank/themes/Arian Theme Light/install.sh +# Version: 0.2 +# +# +# Arian Plank Theme +# +# https://www.gnome-look.org/p/1911700 +# +# ---------------------------------------------------------------------------------------- + +# Cores (tabela de cores: https://gist.github.com/avelino/3188137) + +VERM="\033[1;31m" # Deixa a saída na cor vermelho. +VERD="\033[0;32m" # Deixa a saída na cor verde. +CIAN="\033[0;36m" # Deixa a saída na cor ciano. + +NORM="\033[0m" # Volta para a cor padrão. + +# ---------------------------------------------------------------------------------------- + +# Lista dos programas a serem verificados. + +programas=("plank") + +# Variável para armazenar a lista de programas que não estão instalados. + +programas_faltando="" + +# Verifica se cada programa está instalado. + +for programa in "${programas[@]}"; do + + if ! command -v "$programa" &>/dev/null; then + + programas_faltando+="$program is not installed.\n" + + fi + +done + +# ---------------------------------------------------------------------------------------- + + +# Se algum programa não estiver instalado, exibe a tela de erro. + +if [ -n "$programas_faltando" ]; then + + echo -e "${VERM}\n\nThe following programs are not installed:\n\n$missing_programs \n ${NORM}" + + exit + +fi + +# ---------------------------------------------------------------------------------------- + + +# Verificar se o Picom está instalado. + +if ! command -v picom &> /dev/null; then + + echo -e "${VERM}\n\nPicom is not installed. \n ${NORM}" + + exit 1 + +else + + echo -e "${VERD}\nPicom is installed. \n ${NORM}" + +fi + +# ---------------------------------------------------------------------------------------- + +# Verificar se o processo Picom está rodando. + +if pgrep -x "picom" > /dev/null; then + + echo -e "${VERD}\nPicom is running. \n ${NORM}" + + killall -9 picom + +else + + echo -e "${VERM}\n\nPicom is not running. \n ${NORM}" + + # exit 2 +fi + +# ---------------------------------------------------------------------------------------- + +# Verificar se há algum erro no retorno do Picom (se há alguma mensagem de erro) + +# Rodando o Picom em segundo plano e redirecionando a saída de erro para um arquivo. + +picom &> /tmp/picom.log & + +# Espera um tempo para o Picom tentar iniciar. + +sleep 2 + +if [[ -s /tmp/picom.log ]]; then + + echo -e "${VERM}\n\nThere was an error starting Picom. Check /tmp/picom.log for details. \n ${NORM}" + + cat /tmp/picom.log + + exit 3 +else + echo -e "${VERD}\nPicom started successfully without errors. \n ${NORM}" +fi + +# Limpeza + +rm /tmp/picom.log + +# ---------------------------------------------------------------------------------------- + read -p "Do you want to install Arian theme (Light version) for Plank?" answer @@ -23,12 +144,23 @@ case "$answer" in *) esac else - echo "Couldn't find $PLANK_DIR" - echo "Please Make sure Plank Dock is installed properly" - echo "For Arch-based distros: Try 'sudo pacman -S plank'" - echo "In Debian-based distros: Try 'sudo apt install plank'" + + echo -e "${VERD} + + Couldn't find $PLANK_DIR + + Please Make sure Plank Dock is installed properly + + For Arch-based distros: Try '# pacman -S plank' + + For Void Linux-based distros: Try '# xbps-install -Suvy plank' + + In Debian-based distros: Try '# apt install -y plank' + + ${NORM}" + exit 1 - fi + fi ;; *) From 6185877439a24bf68e24c4111ec4c931a8d3f92c Mon Sep 17 00:00:00 2001 From: Fernando <33039864+tuxslack@users.noreply.github.com> Date: Sun, 19 Jan 2025 13:59:28 -0300 Subject: [PATCH 2/7] Update install.sh * Added check for Picom issue. --- Arian Theme/install.sh | 140 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 136 insertions(+), 4 deletions(-) diff --git a/Arian Theme/install.sh b/Arian Theme/install.sh index b41d901..0c45b56 100644 --- a/Arian Theme/install.sh +++ b/Arian Theme/install.sh @@ -1,4 +1,125 @@ #!/bin/bash +# +# +# Author: Arian Hosseini - https://github.com/arianXdev +# Collaboration: Fernando Souza - https://www.youtube.com/@fernandosuporte/ | https://github.com/tuxslack +# Date: 19/01/2025 +# Script: ~/.local/share/plank/themes/Arian Theme/install.sh +# Version: 0.2 +# +# +# Arian Plank Theme +# +# https://www.gnome-look.org/p/1911700 +# +# ---------------------------------------------------------------------------------------- + +# Cores (tabela de cores: https://gist.github.com/avelino/3188137) + +VERM="\033[1;31m" # Deixa a saída na cor vermelho. +VERD="\033[0;32m" # Deixa a saída na cor verde. +CIAN="\033[0;36m" # Deixa a saída na cor ciano. + +NORM="\033[0m" # Volta para a cor padrão. + +# ---------------------------------------------------------------------------------------- + +# Lista dos programas a serem verificados. + +programas=("plank") + +# Variável para armazenar a lista de programas que não estão instalados. + +programas_faltando="" + +# Verifica se cada programa está instalado. + +for programa in "${programas[@]}"; do + + if ! command -v "$programa" &>/dev/null; then + + programas_faltando+="$program is not installed.\n" + + fi + +done + +# ---------------------------------------------------------------------------------------- + + +# Se algum programa não estiver instalado, exibe a tela de erro. + +if [ -n "$programas_faltando" ]; then + + echo -e "${VERM}\n\nThe following programs are not installed:\n\n$missing_programs \n ${NORM}" + + exit + +fi + +# ---------------------------------------------------------------------------------------- + + +# Verificar se o Picom está instalado. + +if ! command -v picom &> /dev/null; then + + echo -e "${VERM}\n\nPicom is not installed. \n ${NORM}" + + exit 1 + +else + + echo -e "${VERD}\nPicom is installed. \n ${NORM}" + +fi + +# ---------------------------------------------------------------------------------------- + +# Verificar se o processo Picom está rodando. + +if pgrep -x "picom" > /dev/null; then + + echo -e "${VERD}\nPicom is running. \n ${NORM}" + + killall -9 picom + +else + + echo -e "${VERM}\n\nPicom is not running. \n ${NORM}" + + # exit 2 +fi + +# ---------------------------------------------------------------------------------------- + +# Verificar se há algum erro no retorno do Picom (se há alguma mensagem de erro) + +# Rodando o Picom em segundo plano e redirecionando a saída de erro para um arquivo. + +picom &> /tmp/picom.log & + +# Espera um tempo para o Picom tentar iniciar. + +sleep 2 + +if [[ -s /tmp/picom.log ]]; then + + echo -e "${VERM}\n\nThere was an error starting Picom. Check /tmp/picom.log for details. \n ${NORM}" + + cat /tmp/picom.log + + exit 3 +else + echo -e "${VERD}\nPicom started successfully without errors. \n ${NORM}" +fi + +# Limpeza + +rm /tmp/picom.log + +# ---------------------------------------------------------------------------------------- + read -p "Do you want to install Arian theme for Plank?" answer @@ -23,10 +144,21 @@ case "$answer" in *) esac else - echo "Couldn't find $PLANK_DIR" - echo "Please Make sure Plank Dock is installed properly" - echo "For Arch-based distros: Try 'sudo pacman -S plank'" - echo "In Debian-based distros: Try 'sudo apt install plank'" + + echo -e "${VERD} + + Couldn't find $PLANK_DIR + + Please Make sure Plank Dock is installed properly + + For Arch-based distros: Try '# pacman -S plank' + + For Void Linux-based distros: Try '# xbps-install -Suvy plank' + + In Debian-based distros: Try '# apt install -y plank' + + ${NORM}" + exit 1 fi From f8c43756e90262c283787f0399d40bf12a2d9abc Mon Sep 17 00:00:00 2001 From: Fernando <33039864+tuxslack@users.noreply.github.com> Date: Sun, 19 Jan 2025 14:22:10 -0300 Subject: [PATCH 3/7] Update install.sh * Variable Escaping * Checking Source Directories * User Interaction * Error Messages --- install.sh | 124 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 96 insertions(+), 28 deletions(-) diff --git a/install.sh b/install.sh index d303163..aec61d0 100644 --- a/install.sh +++ b/install.sh @@ -1,36 +1,104 @@ #!/bin/bash +# +# +# Author: Arian Hosseini - https://github.com/arianXdev +# Collaboration: Fernando Souza - https://www.youtube.com/@fernandosuporte/ | https://github.com/tuxslack +# Date: 19/01/2025 +# Script: ~/.local/share/plank/themes/Arian Theme/install.sh +# Version: 0.2 +# +# +# Arian Plank Theme +# +# https://www.gnome-look.org/p/1911700 +# +# ---------------------------------------------------------------------------------------- -read -p "Do you want to install Arian theme for Plank?" answer +programas=("picom" "plank") + +# Verificar cada programa + +for prog in "${programas[@]}"; do + + if command -v "$prog" &> /dev/null; then + + echo -e "\n$prog is installed.\n" + + else + + echo -e "\n$prog is not installed.\n" + + exit 1 + + fi + +done + +# ---------------------------------------------------------------------------------------- + +read -p "Do you want to install Arian theme for Plank? (y/n) " answer PLANK_DIR="$HOME/.local/share/plank/themes" +SOURCE_DIR="./Arian Theme" +SOURCE_LIGHT_DIR="./Arian Theme Light" case "$answer" in [yY][eE][sS]|[yY]|"") + + echo "Installing... Please wait!" + + # Verificar se os diretórios de origem existem + + if [ -d "$SOURCE_DIR" ] && [ -d "$SOURCE_LIGHT_DIR" ]; then + + # Verificar se o diretório de instalação do Plank existe + + if [ -d "$PLANK_DIR" ]; then + + cp -Ri "$SOURCE_DIR" "$PLANK_DIR" && cp -Ri "$SOURCE_LIGHT_DIR" "$PLANK_DIR" + + echo "Done!" + + read -p "Arian theme for Plank has been installed successfully! Do you want to open Plank preferences? (y/n) " answer + + case "$answer" in + [yY][eE][sS]|[yY]|"") + + plank --preferences & + + echo "Finish! Enjoy it :)" + + ;; + *) + + echo "Skipping Plank preferences." + + ;; + esac + else + + echo "Couldn't find $PLANK_DIR" + echo "" + echo "Please make sure Plank Dock is installed properly." + echo "For Arch-based distros: Try '# pacman -S plank'" + echo "For Void Linux-based distros: Try '# xbps-install -Suvy plank'" + echo "In Debian-based distros: Try '# apt install -y plank'" + + exit 1 + fi + else + + echo "Couldn't find the theme directories: '$SOURCE_DIR' or '$SOURCE_LIGHT_DIR'" + + exit 1 + fi + ;; + *) + + echo "Installation aborted." + + exit 2 + ;; +esac - echo "Installing... Please wait!" - - if [ -d $PLANK_DIR ]; then - cp -Ri ./"Arian Theme" $PLANK_DIR && cp -Ri ./"Arian Theme Light" $PLANK_DIR - - echo "Done!" - read -p "Arian theme for Plank has been installed successfully! Do you want to open Plank preferences?" answer - - case "$answer" in - [yY][eE][sS]|[yY]|"") - plank --preferences - - echo "Finish! Enjoy it :)" - ;; - *) - esac - else - echo "Couldn't find $PLANK_DIR" - echo "Please Make sure Plank Dock is installed properly" - echo "For Arch-based distros: Try 'sudo pacman -S plank'" - echo "In Debian-based distros: Try 'sudo apt install plank'" - exit 1 - fi - - ;; -*) -esac \ No newline at end of file +exit 0 From 950645cf046412db76a3c02381dc3df30b4e1c47 Mon Sep 17 00:00:00 2001 From: Fernando <33039864+tuxslack@users.noreply.github.com> Date: Sun, 19 Jan 2025 14:29:04 -0300 Subject: [PATCH 4/7] Update README.md * dependency installation (Void Linux) --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index d07710e..3b91fe5 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,12 @@ yay -S plank-theme-arian-git ![Linux Icon](https://img.shields.io/badge/manjaro-35BF5C?style=for-the-badge&logo=manjaro&logoColor=white) ![Linux Icon](https://img.shields.io/badge/Artix_Linux-10A0CC?style=for-the-badge&logo=artix-linux&logoColor=white) +### Void Linux (dependency installation) + +```Shell +# xbps-install -Suvy plank picom +``` + ### Other Distributions / Manually ```Shell git clone https://github.com/ryanhosseini/arian-plank-theme.git From ab2471fca357d0dd5d0df570403989d12beb7112 Mon Sep 17 00:00:00 2001 From: Fernando <33039864+tuxslack@users.noreply.github.com> Date: Sun, 19 Jan 2025 15:09:30 -0300 Subject: [PATCH 5/7] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 3b91fe5..fb59924 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,28 @@ yay -S plank-theme-arian-git ```Shell # xbps-install -Suvy plank picom + +$ mkdir -p $HOME/.local/share/plank/themes + +``` + +Configuring Picom on Void Linux. + +```Shell +$ rm -Rf ~/.config/picom/ or mv -i ~/.config/picom ~/.config/picom-backup + +$ mkdir -p ~/.config/picom/ + +$ cp /usr/share/examples/picom/picom.sample.conf ~/.config/picom/picom.conf + +$ picom & +``` +### Clone the repository + +```Shell +git clone https://github.com/ryanhosseini/arian-plank-theme.git +cd arian-plank-theme/ +sh install.sh ``` ### Other Distributions / Manually @@ -66,6 +88,7 @@ sh install.sh ![Linux Icon](https://img.shields.io/badge/Linux_Mint-87CF3E?style=for-the-badge&logo=linux-mint&logoColor=white) ![Linux Icon](https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge&logo=ubuntu&logoColor=white) ![Linux Icon](https://img.shields.io/badge/Cent%20OS-262577?style=for-the-badge&logo=CentOS&logoColor=white) +![ Linux Icon](https://avatars.githubusercontent.com/u/37247796?s=80&v=4)
From 94d8b965823136b5713e240776836a0ba8e1e2c8 Mon Sep 17 00:00:00 2001 From: Fernando <33039864+tuxslack@users.noreply.github.com> Date: Sun, 19 Jan 2025 15:12:30 -0300 Subject: [PATCH 6/7] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fb59924..396ba09 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ yay -S plank-theme-arian-git ### Void Linux (dependency installation) ```Shell + # xbps-install -Suvy plank picom $ mkdir -p $HOME/.local/share/plank/themes @@ -59,6 +60,8 @@ $ mkdir -p $HOME/.local/share/plank/themes Configuring Picom on Void Linux. ```Shell +$ killall -9 picom + $ rm -Rf ~/.config/picom/ or mv -i ~/.config/picom ~/.config/picom-backup $ mkdir -p ~/.config/picom/ @@ -77,9 +80,12 @@ sh install.sh ### Other Distributions / Manually ```Shell +$ killall -9 plank + git clone https://github.com/ryanhosseini/arian-plank-theme.git cd arian-plank-theme/ -sh install.sh +sh install.sh + ``` ![Linux Icon](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black) From 657edc6715feb781c2726445df66f6e026c70e34 Mon Sep 17 00:00:00 2001 From: Fernando <33039864+tuxslack@users.noreply.github.com> Date: Sun, 19 Jan 2025 15:13:53 -0300 Subject: [PATCH 7/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 396ba09..14efe8e 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,8 @@ $ picom & ### Clone the repository ```Shell +$ killall -9 plank + git clone https://github.com/ryanhosseini/arian-plank-theme.git cd arian-plank-theme/ sh install.sh