From d94c59b0c73800cf5888261b900026405f1be8dd Mon Sep 17 00:00:00 2001 From: Ben Hur Nascimento Date: Fri, 1 Jul 2016 18:23:09 -0300 Subject: [PATCH] Code changed to infer the terminal used instead the OS. --- _apply-colors.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/_apply-colors.sh b/_apply-colors.sh index 76f926e..db565a5 100644 --- a/_apply-colors.sh +++ b/_apply-colors.sh @@ -13,12 +13,11 @@ function gnome_color () { } # | -# | Check for OS and decide how to apply +# | Check for the terminal name and decide how to apply # | =========================================== -if [ $(lsb_release -c -s) = "freya" ]; then - +if [ $(ps -p $(ps -p $(ps -p $$ -o ppid=) -o ppid=) -o args=) = "pantheon-terminal" ]; then # | - # | Apply Variables + # | Applying values on pantheon-terminal # | =========================================== gsettings set org.pantheon.terminal.settings background "${BACKGROUND_COLOR}" gsettings set org.pantheon.terminal.settings foreground "${FOREGROUND_COLOR}" @@ -26,9 +25,8 @@ if [ $(lsb_release -c -s) = "freya" ]; then gsettings set org.pantheon.terminal.settings palette "${COLOR_01}:${COLOR_02}:${COLOR_03}:${COLOR_04}:${COLOR_05}:${COLOR_06}:${COLOR_07}:${COLOR_08}:${COLOR_09}:${COLOR_10}:${COLOR_11}:${COLOR_12}:${COLOR_13}:${COLOR_14}:${COLOR_15}:${COLOR_16}" else - # | - # | Set gnome Variables + # | Applying values on gnome-terminal # | =========================================== BACKGROUND_COLOR=$(gnome_color $BACKGROUND_COLOR) FOREGROUND_COLOR=$(gnome_color $FOREGROUND_COLOR)