From 77eb4a347c608011e0dd3c48abca2cf41749c8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Fri, 23 Oct 2020 12:53:01 +0200 Subject: [PATCH] Themes - Fix Ascii/Blocks themes and use *_DEFAULT * Ascii and Blocks themes need to use the terminal's defaults, otherwise they will leave a black smear on a non-black terminal background. * Replace -1 colors with SECTION_DEFAULT --- themes/ascii_gyr.pm | 36 ++++++++++++++++++------------------ themes/ascii_yb.pm | 36 ++++++++++++++++++------------------ themes/blocks_gyr.pm | 36 ++++++++++++++++++------------------ themes/blocks_yb.pm | 36 ++++++++++++++++++------------------ themes/powerline_gyr.pm | 22 +++++++++++----------- themes/powerline_yb.pm | 24 ++++++++++++------------ 6 files changed, 95 insertions(+), 95 deletions(-) diff --git a/themes/ascii_gyr.pm b/themes/ascii_gyr.pm index 6d67314..86f4af2 100644 --- a/themes/ascii_gyr.pm +++ b/themes/ascii_gyr.pm @@ -4,15 +4,15 @@ 'padding' => '-', # Extra colors for transition strings - 'transition' => [ 0 , 230 ] , + 'transition' => [ TERM_DEFAULT , 230 ] , # Default background/foreground colors - 'bg' => 0, + 'bg' => TERM_DEFAULT, 'fg' => 7, # Color gradient used in various parts - fg0 => 2 , bg0 => -1 , - fg1 => 10 , bg1 => -1 , - fg2 => 11 , bg2 => -1 , - fg3 => 9 , bg3 => -1 , + fg0 => 2 , bg0 => SECTION_DEFAULT , + fg1 => 10 , bg1 => SECTION_DEFAULT , + fg2 => 11 , bg2 => SECTION_DEFAULT , + fg3 => 9 , bg3 => SECTION_DEFAULT , # Left side of top line 'bg_left' => thref 'bg', @@ -45,8 +45,8 @@ # Current working directory - Truncation string cwd_trunc => '...' , # Current working directory - Foreground / background colors - 'cwd_fg_color' => -1 , - 'cwd_bg_color' => -1 , + 'cwd_fg_color' => SECTION_DEFAULT , + 'cwd_bg_color' => SECTION_DEFAULT , # User@host - Remote host symbol 'uh_remote_symbol' => '(r)', @@ -58,27 +58,27 @@ 'uh_root_bg' => thref 'bg3' , # Date/time - Colors - 'dt_time_fg' => -1 , - 'dt_date_fg' => -1 , - 'dt_bg' => -1 , + 'dt_time_fg' => SECTION_DEFAULT , + 'dt_date_fg' => SECTION_DEFAULT , + 'dt_bg' => SECTION_DEFAULT , # Previous command state - Symbols 'pcmd_ok_sym' => ':-)', 'pcmd_err_sym' => ':-(', # Previous command state - OK text / background color 'pcmd_ok_fg' => thref 'fg0', - 'pcmd_ok_bg' => -1 , + 'pcmd_ok_bg' => SECTION_DEFAULT , # Previous command state - Error text / background color 'pcmd_err_fg' => thref 'fg3', - 'pcmd_err_bg' => -1 , + 'pcmd_err_bg' => SECTION_DEFAULT , # Previous command state - Other text foreground - 'pcmd_text_fg' => -1 , + 'pcmd_text_fg' => SECTION_DEFAULT , # Load average - Symbol or text 'load_title' => 'ld', # Load average - Low load colors - 'load_low_fg' => -1, - 'load_low_bg' => -1, + 'load_low_fg' => SECTION_DEFAULT, + 'load_low_bg' => SECTION_DEFAULT, # Load average - Medium load colors 'load_med_fg' => thref 'fg2', 'load_med_bg' => thref 'bg2', @@ -126,6 +126,6 @@ 'git_stash_fg' => thref 'fg1' , # Python virtual environment section colors - 'pyenv_fg' => -1, - 'pyenv_bg' => -1, + 'pyenv_fg' => SECTION_DEFAULT, + 'pyenv_bg' => SECTION_DEFAULT, } diff --git a/themes/ascii_yb.pm b/themes/ascii_yb.pm index b373c44..364148f 100644 --- a/themes/ascii_yb.pm +++ b/themes/ascii_yb.pm @@ -4,15 +4,15 @@ 'padding' => '-', # Extra colors for transition strings - 'transition' => [ 0 , 189 ] , + 'transition' => [ TERM_DEFAULT , 189 ] , # Default background/foreground colors - 'bg' => 0, + 'bg' => TERM_DEFAULT, 'fg' => 7, # Color gradient used in various parts - fg0 => 69 , bg0 => -1 , - fg1 => 117 , bg1 => -1 , - fg2 => 178 , bg2 => -1 , - fg3 => 226 , bg3 => -1 , + fg0 => 69 , bg0 => SECTION_DEFAULT , + fg1 => 117 , bg1 => SECTION_DEFAULT , + fg2 => 178 , bg2 => SECTION_DEFAULT , + fg3 => 226 , bg3 => SECTION_DEFAULT , # Left side of top line 'bg_left' => thref 'bg', @@ -45,8 +45,8 @@ # Current working directory - Truncation string cwd_trunc => '...' , # Current working directory - Foreground / background colors - 'cwd_fg_color' => -1 , - 'cwd_bg_color' => -1 , + 'cwd_fg_color' => SECTION_DEFAULT , + 'cwd_bg_color' => SECTION_DEFAULT , # User@host - Remote host symbol 'uh_remote_symbol' => '(r)', @@ -58,27 +58,27 @@ 'uh_root_bg' => thref 'bg3' , # Date/time - Colors - 'dt_time_fg' => -1 , - 'dt_date_fg' => -1 , - 'dt_bg' => -1 , + 'dt_time_fg' => SECTION_DEFAULT , + 'dt_date_fg' => SECTION_DEFAULT , + 'dt_bg' => SECTION_DEFAULT , # Previous command state - Symbols 'pcmd_ok_sym' => ':-)', 'pcmd_err_sym' => ':-(', # Previous command state - OK text / background color 'pcmd_ok_fg' => thref 'fg0', - 'pcmd_ok_bg' => -1 , + 'pcmd_ok_bg' => SECTION_DEFAULT , # Previous command state - Error text / background color 'pcmd_err_fg' => thref 'fg3', - 'pcmd_err_bg' => -1 , + 'pcmd_err_bg' => SECTION_DEFAULT , # Previous command state - Other text foreground - 'pcmd_text_fg' => -1 , + 'pcmd_text_fg' => SECTION_DEFAULT , # Load average - Symbol or text 'load_title' => 'ld', # Load average - Low load colors - 'load_low_fg' => -1, - 'load_low_bg' => -1, + 'load_low_fg' => SECTION_DEFAULT, + 'load_low_bg' => SECTION_DEFAULT, # Load average - Medium load colors 'load_med_fg' => thref 'fg2', 'load_med_bg' => thref 'bg2', @@ -126,6 +126,6 @@ 'git_stash_fg' => thref 'fg1' , # Python virtual environment section colors - 'pyenv_fg' => -1, - 'pyenv_bg' => -1, + 'pyenv_fg' => SECTION_DEFAULT, + 'pyenv_bg' => SECTION_DEFAULT, } diff --git a/themes/blocks_gyr.pm b/themes/blocks_gyr.pm index 358acd9..ea3858a 100644 --- a/themes/blocks_gyr.pm +++ b/themes/blocks_gyr.pm @@ -4,15 +4,15 @@ 'padding' => "\x{2500}", # Extra colors for transition strings - 'transition' => [ 0 , 230 ] , + 'transition' => [ TERM_DEFAULT , 230 ] , # Default background/foreground colors - 'bg' => 0, + 'bg' => TERM_DEFAULT, 'fg' => 7, # Color gradient used in various parts - fg0 => 2 , bg0 => -1 , - fg1 => 10 , bg1 => -1 , - fg2 => 11 , bg2 => -1 , - fg3 => 9 , bg3 => -1 , + fg0 => 2 , bg0 => SECTION_DEFAULT , + fg1 => 10 , bg1 => SECTION_DEFAULT , + fg2 => 11 , bg2 => SECTION_DEFAULT , + fg3 => 9 , bg3 => SECTION_DEFAULT , # Left side of top line 'bg_left' => thref 'bg', @@ -45,8 +45,8 @@ # Current working directory - Truncation string 'cwd_trunc' => "\x{2026}", # Current working directory - Foreground / background colors - 'cwd_fg_color' => -1 , - 'cwd_bg_color' => -1 , + 'cwd_fg_color' => SECTION_DEFAULT , + 'cwd_bg_color' => SECTION_DEFAULT , # User@host - Remote host symbol 'uh_remote_symbol' => "\x{21a5}", @@ -58,27 +58,27 @@ 'uh_root_bg' => thref 'bg3' , # Date/time - Colors - 'dt_time_fg' => -1 , - 'dt_date_fg' => -1 , - 'dt_bg' => -1 , + 'dt_time_fg' => SECTION_DEFAULT , + 'dt_date_fg' => SECTION_DEFAULT , + 'dt_bg' => SECTION_DEFAULT , # Previous command state - Symbols 'pcmd_ok_sym' => "\x{2713}", 'pcmd_err_sym' => "\x{2717}", # Previous command state - OK text / background color 'pcmd_ok_fg' => thref 'fg0', - 'pcmd_ok_bg' => -1 , + 'pcmd_ok_bg' => SECTION_DEFAULT , # Previous command state - Error text / background color 'pcmd_err_fg' => thref 'fg3', - 'pcmd_err_bg' => -1 , + 'pcmd_err_bg' => SECTION_DEFAULT , # Previous command state - Other text foreground - 'pcmd_text_fg' => -1 , + 'pcmd_text_fg' => SECTION_DEFAULT , # Load average - Symbol or text 'load_title' => "\x{219f}", # Load average - Low load colors - 'load_low_fg' => -1, - 'load_low_bg' => -1, + 'load_low_fg' => SECTION_DEFAULT, + 'load_low_bg' => SECTION_DEFAULT, # Load average - Medium load colors 'load_med_fg' => thref 'fg2', 'load_med_bg' => thref 'bg2', @@ -126,6 +126,6 @@ 'git_stash_fg' => thref 'fg1' , # Python virtual environment section colors - 'pyenv_fg' => -1, - 'pyenv_bg' => -1, + 'pyenv_fg' => SECTION_DEFAULT, + 'pyenv_bg' => SECTION_DEFAULT, } diff --git a/themes/blocks_yb.pm b/themes/blocks_yb.pm index c704ece..ee6bf6b 100644 --- a/themes/blocks_yb.pm +++ b/themes/blocks_yb.pm @@ -4,15 +4,15 @@ 'padding' => "\x{2500}", # Extra colors for transition strings - 'transition' => [ 0, 189 ], + 'transition' => [ TERM_DEFAULT, 189 ], # Default background/foreground colors - 'bg' => 0, + 'bg' => TERM_DEFAULT, 'fg' => 7, # Color gradient used in various parts - fg0 => 69, bg0 => -1, - fg1 => 117, bg1 => -1, - fg2 => 178, bg2 => -1, - fg3 => 226, bg3 => -1, + fg0 => 69, bg0 => SECTION_DEFAULT, + fg1 => 117, bg1 => SECTION_DEFAULT, + fg2 => 178, bg2 => SECTION_DEFAULT, + fg3 => 226, bg3 => SECTION_DEFAULT, # Left side of top line 'bg_left' => thref 'bg', @@ -45,8 +45,8 @@ # Current working directory - Truncation string 'cwd_trunc' => "\x{2026}", # Current working directory - Foreground / background colors - 'cwd_fg_color' => -1 , - 'cwd_bg_color' => -1 , + 'cwd_fg_color' => SECTION_DEFAULT , + 'cwd_bg_color' => SECTION_DEFAULT , # User@host - Remote host symbol 'uh_remote_symbol' => "\x{21a5}", @@ -58,27 +58,27 @@ 'uh_root_bg' => thref 'bg3' , # Date/time - Colors - 'dt_time_fg' => -1 , - 'dt_date_fg' => -1 , - 'dt_bg' => -1 , + 'dt_time_fg' => SECTION_DEFAULT , + 'dt_date_fg' => SECTION_DEFAULT , + 'dt_bg' => SECTION_DEFAULT , # Previous command state - Symbols 'pcmd_ok_sym' => "\x{2713}", 'pcmd_err_sym' => "\x{2717}", # Previous command state - OK text / background color 'pcmd_ok_fg' => thref 'fg0', - 'pcmd_ok_bg' => -1 , + 'pcmd_ok_bg' => SECTION_DEFAULT , # Previous command state - Error text / background color 'pcmd_err_fg' => thref 'fg3', - 'pcmd_err_bg' => -1 , + 'pcmd_err_bg' => SECTION_DEFAULT , # Previous command state - Other text foreground - 'pcmd_text_fg' => -1 , + 'pcmd_text_fg' => SECTION_DEFAULT , # Load average - Symbol or text 'load_title' => "\x{219f}", # Load average - Low load colors - 'load_low_fg' => -1, - 'load_low_bg' => -1, + 'load_low_fg' => SECTION_DEFAULT, + 'load_low_bg' => SECTION_DEFAULT, # Load average - Medium load colors 'load_med_fg' => thref 'fg2', 'load_med_bg' => thref 'bg2', @@ -126,6 +126,6 @@ 'git_stash_fg' => thref 'fg1' , # Python virtual environment section colors - 'pyenv_fg' => -1, - 'pyenv_bg' => -1, + 'pyenv_fg' => SECTION_DEFAULT, + 'pyenv_bg' => SECTION_DEFAULT, } diff --git a/themes/powerline_gyr.pm b/themes/powerline_gyr.pm index ea21cfc..57ae2d6 100644 --- a/themes/powerline_gyr.pm +++ b/themes/powerline_gyr.pm @@ -44,8 +44,8 @@ # Current working directory - Truncation string 'cwd_trunc' => "\x{2026}", # Current working directory - Foreground / background colors - 'cwd_fg_color' => -1 , - 'cwd_bg_color' => -1 , + 'cwd_fg_color' => SECTION_DEFAULT , + 'cwd_bg_color' => SECTION_DEFAULT , # User@host - Remote host symbol 'uh_remote_symbol' => "\x{21a5}", @@ -57,27 +57,27 @@ 'uh_root_bg' => thref 'bg3' , # Date/time - Colors - 'dt_time_fg' => -1 , - 'dt_date_fg' => -1 , - 'dt_bg' => -1 , + 'dt_time_fg' => SECTION_DEFAULT , + 'dt_date_fg' => SECTION_DEFAULT , + 'dt_bg' => SECTION_DEFAULT , # Previous command state - Symbols 'pcmd_ok_sym' => "\x{2713}", 'pcmd_err_sym' => "\x{2717}", # Previous command state - OK text / background color 'pcmd_ok_fg' => 10 , - 'pcmd_ok_bg' => -1 , + 'pcmd_ok_bg' => SECTION_DEFAULT , # Previous command state - Error text / background color 'pcmd_err_fg' => 11 , 'pcmd_err_bg' => 1 , # Previous command state - Other text foreground - 'pcmd_text_fg' => -1 , + 'pcmd_text_fg' => SECTION_DEFAULT , # Load average - Symbol or text 'load_title' => "\x{219f}", # Load average - Low load colors - 'load_low_fg' => -1, - 'load_low_bg' => -1, + 'load_low_fg' => SECTION_DEFAULT, + 'load_low_bg' => SECTION_DEFAULT, # Load average - Medium load colors 'load_med_fg' => thref 'fg2', 'load_med_bg' => thref 'bg2', @@ -125,6 +125,6 @@ 'git_stash_fg' => thref 'fg1' , # Python virtual environment section colors - 'pyenv_fg' => -1, - 'pyenv_bg' => -1, + 'pyenv_fg' => SECTION_DEFAULT, + 'pyenv_bg' => SECTION_DEFAULT, } diff --git a/themes/powerline_yb.pm b/themes/powerline_yb.pm index 0ff5fdf..29a2d79 100644 --- a/themes/powerline_yb.pm +++ b/themes/powerline_yb.pm @@ -44,8 +44,8 @@ # Current working directory - Truncation string 'cwd_trunc' => "\x{2026}", # Current working directory - Foreground / background colors - 'cwd_fg_color' => -1 , - 'cwd_bg_color' => -1 , + 'cwd_fg_color' => SECTION_DEFAULT , + 'cwd_bg_color' => SECTION_DEFAULT , # User@host - Remote host symbol 'uh_remote_symbol' => "\x{21a5}", @@ -57,27 +57,27 @@ 'uh_root_bg' => thref 'bg3' , # Date/time - Colors - 'dt_time_fg' => -1 , - 'dt_date_fg' => -1 , - 'dt_bg' => -1 , + 'dt_time_fg' => SECTION_DEFAULT , + 'dt_date_fg' => SECTION_DEFAULT , + 'dt_bg' => SECTION_DEFAULT , # Previous command state - Symbols 'pcmd_ok_sym' => "\x{2713}", 'pcmd_err_sym' => "\x{2717}", # Previous command state - OK text / background color 'pcmd_ok_fg' => thref( 'fg3' ) , - 'pcmd_ok_bg' => -1 , + 'pcmd_ok_bg' => SECTION_DEFAULT , # Previous command state - Error text / background color 'pcmd_err_fg' => thref( 'fg0' ) , - 'pcmd_err_bg' => -1 , + 'pcmd_err_bg' => SECTION_DEFAULT , # Previous command state - Other text foreground - 'pcmd_text_fg' => -1 , + 'pcmd_text_fg' => SECTION_DEFAULT , # Load average - Symbol or text 'load_title' => "\x{219f}", # Load average - Low load colors - 'load_low_fg' => -1, - 'load_low_bg' => -1, + 'load_low_fg' => SECTION_DEFAULT, + 'load_low_bg' => SECTION_DEFAULT, # Load average - Medium load colors 'load_med_fg' => thref 'fg2', 'load_med_bg' => thref 'bg2', @@ -125,6 +125,6 @@ 'git_stash_fg' => thref 'fg1' , # Python virtual environment section colors - 'pyenv_fg' => -1, - 'pyenv_bg' => -1, + 'pyenv_fg' => SECTION_DEFAULT, + 'pyenv_bg' => SECTION_DEFAULT, }