External configuration and themes

The script no longer contains theme definitions, and the default
configuration has been made much simpler. Existing themes have been
moved to a bunch of files (one file per theme) in a subdirectory.
This commit is contained in:
Emmanuel BENOîT 2020-10-21 12:39:23 +02:00
parent 8652ef6f68
commit a021c87a65
8 changed files with 1061 additions and 313 deletions

91
example-spp.rc Normal file
View file

@ -0,0 +1,91 @@
{
# CONFIGURATION
# - Issue warnings about configuration files
cfg_warn_files => 1 ,
# - Allow overrides from environment
cfg_from_env => 0 ,
# - System theme dirs
cfg_sys_themes => [ '/usr/share/spp/themes' ] ,
# - User theme dirs
cfg_user_themes => [ '.local/share/spp/themes' , '.spp-themes' ] ,
# LAYOUT
# - Theme and local overrides
layout_theme => 'blocks_yb' ,
layout_theme_overrides => {} ,
# - Section generators for the left side of the top bar
layout_left => [
'datetime' ,
'userhost' ,
] ,
# - Section generator for the central part of the top bar (undef if unused)
layout_middle => 'cwd' ,
# - Section generators for the right side of the top bar
layout_right => [
'pyenv' ,
'git' ,
] ,
# - Section generators for the input bar
layout_input => [
'load' ,
'prevcmd' ,
] ,
# - Always generate input line?
layout_input_always => 0 ,
# TERMINAL TITLE
# - Set title from the prompt? 0=no, 1=normal, 2=minimized, 3=both
term_set_title => 1 ,
# - Generators to use
term_generators => [ 'userhost' , 'cwd' , 'pyenv' ] ,
# - Separator
term_separator => ' ::: ' ,
# CURRENT WORKING DIRECTORY
# - Max width as a percentage of the terminal's width
cwd_max_width => 50 ,
# USER@HOST
# - Display username? 0=no, 1=yes
uh_username => 1 ,
# - Display hostname? 0=no, 1=always, 2=remote only
uh_hostname => 2 ,
# - Display symbol for remote hosts?
uh_remote => 1 ,
# DATE/TIME
# - Display date?
dt_show_date => 0 ,
# - Display time?
dt_show_time => 1 ,
# - Date format
dt_date_fmt => '%Y-%m-%d' ,
# - Time format
dt_time_fmt => '%H:%M' ,
# PREVIOUS COMMAND STATE
# - Display OK/failed symbol?
pcmd_show_symbol => 1 ,
# - Display status code? 0=no, 1=always, 2=on failure
pcmd_show_code => 2 ,
# - Pad status code display? 0 = no, -1 = left aligned, 1 = right aligned
pcmd_pad_code => -1 ,
# Success/failure colors for 0=nothing, 1=symbol, 2=code, 3=both
pcmd_colors => 1 ,
# LOAD AVERAGE
# - Minimal load average before the section is displayed
load_min => 3 ,
# GIT
# - Branches for which the prompt should emit a strong warning
git_branch_danger => [ 'main' , 'master' ] ,
# - Branches for which the prompt should emit a weak warning
git_branch_warn => [ 'dev' , 'develop' ] ,
# - Warning mode for detached heads (0=none, 1=weak, 2=strong)
git_detached_warning => 2 ,
# - Show git status?
git_show_status => 1 ,
# - Show git stash count?
git_show_stash => 1 ,
}

499
spp.pl
View file

@ -17,40 +17,23 @@ our %CONFIG = (
cfg_warn_files => 1 ,
# - Allow overrides from environment
cfg_from_env => 0 ,
# - System theme dirs
cfg_sys_themes => [ '/usr/share/spp/themes' ] ,
# - User theme dirs
cfg_user_themes => [ '.local/share/spp/themes' , '.spp-themes' ] ,
# LAYOUT
# - Theme and local overrides
layout_theme => 'ascii_yb' ,
layout_theme => '' ,
layout_theme_overrides => {} ,
# - Section generators for the left side of the top bar
layout_left => [
'datetime' ,
'userhost' ,
#'load' ,
#'prevcmd' ,
#'pyenv' ,
#'git' ,
] ,
layout_left => [ ] ,
# - Section generator for the central part of the top bar (undef if unused)
layout_middle => 'cwd' ,
layout_middle => '' ,
# - Section generators for the right side of the top bar
layout_right => [
#'datetime' ,
#'userhost' ,
'load' ,
#'prevcmd' ,
'pyenv' ,
'git' ,
] ,
layout_right => [ ] ,
# - Section generators for the input bar
layout_input => [
#'datetime' ,
#'userhost' ,
#'load' ,
'prevcmd' ,
#'pyenv' ,
#'git' ,
] ,
layout_input => [ qw( userhost cwd ) ] ,
# - Always generate input line?
layout_input_always => 0 ,
@ -58,9 +41,9 @@ our %CONFIG = (
# - Set title from the prompt? 0=no, 1=normal, 2=minimized, 3=both
term_set_title => 1 ,
# - Generators to use
term_generators => [ 'userhost' , 'cwd' , 'pyenv' ] ,
term_generators => [ qw( userhost cwd ) ] ,
# - Separator
term_separator => ' ::: ' ,
term_separator => ':' ,
# CURRENT WORKING DIRECTORY
# - Max width as a percentage of the terminal's width
@ -70,9 +53,9 @@ our %CONFIG = (
# - Display username? 0=no, 1=yes
uh_username => 1 ,
# - Display hostname? 0=no, 1=always, 2=remote only
uh_hostname => 2 ,
uh_hostname => 1 ,
# - Display symbol for remote hosts?
uh_remote => 1 ,
uh_remote => 0 ,
# DATE/TIME
# - Display date?
@ -111,296 +94,134 @@ our %CONFIG = (
git_show_stash => 1 ,
);
# }}}
# THEMES ===================================================================={{{
# Default theme -------------------------------------------------------------{{{
sub thref { bless {(@_==2)?(t=>$_[0],r=>$_[1]):(r=>$_[0])}, 'ThemeRef'; }
sub init_themes
sub default_theme
{
my %t = ();
# Elements that are common between most themes
my %common = (
# Default left side colors
fg_left => thref( 'fg' ) ,
# Default middle colors
fg_middle => thref( 'fg' ) ,
# Default right side colors
bg_right => thref( 'bg_left' ) ,
fg_right => thref( 'fg' ) ,
# Default input prompt colors
fg_input => thref( 'fg' ) ,
# Current working directory - Truncation string
cwd_trunc => '…' ,
# Current working directory - Foreground / background colors
cwd_fg_color => -1 ,
cwd_bg_color => -1 ,
# User@host - Remote host symbol
uh_remote_symbol => '↥' ,
# User@host - User - Foreground and background colors
uh_user_fg => thref( 'fg0' ) ,
uh_user_bg => thref( 'bg0' ) ,
# User@host - Root - Foreground and background colors
uh_root_fg => thref( 'fg3' ) ,
uh_root_bg => thref( 'bg3' ) ,
# Date/time - Colors
dt_time_fg => -1 ,
dt_date_fg => -1 ,
dt_bg => -1 ,
# Previous command state - Symbols
pcmd_ok_sym => '✓' ,
pcmd_err_sym => '✗' ,
# Previous command state - OK text / background color
pcmd_ok_bg => -1 ,
# Previous command state - Error text / background color
pcmd_err_bg => -1 ,
# Previous command state - Other text foreground
pcmd_text_fg => -1 ,
# Load average - Symbol or text
load_title => '↟' ,
# Load average - Low load colors
load_low_fg => -1 ,
load_low_bg => -1 ,
# Load average - Medium load colors
load_med_fg => thref( 'fg2' ) ,
load_med_bg => thref( 'bg2' ) ,
# Load average - High load colors
load_high_fg => thref( 'fg3' ) ,
load_high_bg => thref( 'bg3' ) ,
# Git - Branch colors - No warning
git_branch_ok_bg => thref( 'bg0' ) ,
git_branch_ok_fg => thref( 'fg0' ) ,
# Git - Branch colors - Weak warning
git_branch_warn_bg => thref( 'bg2' ) ,
git_branch_warn_fg => thref( 'fg2' ) ,
# Git - Branch colors - Strong warning
git_branch_danger_bg => thref( 'bg3' ) ,
git_branch_danger_fg => thref( 'fg3' ) ,
# Git - Repo state colors
git_repstate_bg => thref( 'bg1' ) ,
git_repstate_fg => thref( 'fg1' ) ,
# Git - Padding character for status sections
git_status_pad => '' ,
# Git - Untracked symbol and colors
git_untracked_symbol => '❄' ,
git_untracked_bg => thref( 'bg3' ) ,
git_untracked_normal_fg => thref( 'fg3' ) ,
git_untracked_add_fg => thref( 'fg3' ) ,
git_untracked_mod_fg => thref( 'fg3' ) ,
git_untracked_del_fg => thref( 'fg3' ) ,
# Git - Indexed symbol and colors
git_indexed_symbol => '☰' ,
git_indexed_bg => thref( 'bg2' ) ,
git_indexed_normal_fg => thref( 'fg2' ) ,
git_indexed_add_fg => thref( 'fg2' ) ,
git_indexed_mod_fg => thref( 'fg2' ) ,
git_indexed_del_fg => thref( 'fg2' ) ,
# Git - Add/modify/delete symbols
git_add_symbol => '+' ,
git_mod_symbol => '±' ,
git_del_symbol => '∅' ,
# Git stash symbol and color
git_stash_symbol => '‡' ,
git_stash_bg => thref( 'bg1' ) ,
git_stash_fg => thref( 'fg1' ) ,
# Python virtual environment section colors
pyenv_bg => -1 ,
pyenv_fg => -1 ,
);
# Base configuration for the Powerline-based themes below
my %powerline = ( %common ,
return {
# Padding character
padding => ' ' ,
# Left side of top line
left_prefix => '\b1 ' ,
left_separator => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}" ,
left_suffix => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Middle of top line
middle_prefix => '' ,
middle_separator => ' | ' ,
middle_suffix => '' ,
# Right side of top line
right_prefix => '\f2\b0'."\x{e0b2}".'\f1\b2'."\x{e0b2}".'\b1' ,
right_separator => '\f2\b0'."\x{e0b2}".'\f1\b2'."\x{e0b2}" ,
right_suffix => '\b0 ' ,
# Input line
input_prefix => '\b1 ' ,
input_separator => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}" ,
input_suffix => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Secondary prompt suffix
ps2_suffix => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
'padding' => ' ',
# Extra colors for transition strings
transition => [ 233 ] ,
# Default left side colors
bg_left => 239 ,
# Default middle colors
bg_middle => 235 ,
# Default input prompt color
bg_input => 238 ,
# Secondary prompt backaground
bg_ps2 => 234 ,
# Previous command state - OK text / background color
pcmd_ok_fg => thref( 'fg3' ) ,
# Previous command state - Error text / background color
pcmd_err_fg => thref( 'fg0' ) ,
# Git
git_branch_symbol => "\x{e0a0} " ,
git_branch_danger_fg => 0 ,
);
# Powerline-based, using yellow and blue
$t{powerline_yb} = {
%powerline ,
# Color gradient to use
bg0 => 21 , bg1 => 61 , bg2 => 143 , bg3 => 226 ,
fg3 => 18 , fg2 => 21 , fg1 => 184 , fg0 => 226 ,
# Default foreground color
fg => 15 ,
};
# Powerline-based, using green/yellow/red
$t{powerline_gyr} = {
%powerline ,
bg0 => 2 , bg1 => 10 , bg2 => 11 , bg3 => 9 ,
fg3 => 0 , fg2 => 0 , fg1 => 0 , fg0 => 0 ,
fg => 15 ,
pcmd_ok_fg => 10 , pcmd_ok_bg => -1 ,
pcmd_err_fg => 0 , pcmd_err_bg => 9 ,
};
# Base configuration for the unicode box-based themes below
my %blocks = ( %common ,
# Padding character
padding => '─' ,
'transition' => [ 7 ] ,
# Left side of top line
left_prefix => '\b2\f3╭┄ ' ,
left_separator => '\b2\f3 ┈ ' ,
left_suffix => '\b2\f3 ┄╢' ,
'bg_left' => 0,
'fg_left' => 7,
'left_prefix' => '' ,
'left_separator' => ' ' ,
'left_suffix' => '\f2 | ' ,
# Middle of top line
middle_prefix => ' ' ,
middle_separator => ' | ' ,
middle_suffix => ' ' ,
'bg_middle' => 0,
'fg_middle' => 7,
'middle_prefix' => ' ',
'middle_separator' => ' ',
'middle_suffix' => ' ',
# Right side of top line
right_prefix => '\b2\f3╫┄ ' ,
right_separator => '\b2\f3 ┈ ' ,
right_suffix => '\b2\f3 ┄(' ,
'bg_right' => 0,
'fg_right' => 7,
'right_prefix' => '\f2 | ' ,
'right_separator' => ' ' ,
'right_suffix' => '' ,
# Input line
input_prefix => '\b2\f3╰┄' ,
input_separator => '\b2\f3┈' ,
input_suffix => '\b2\f3─> ' ,
# Secondary prompt suffix
ps2_suffix => '\b2\f3┊ ' ,
# Foreground
fg => 7 ,
# Extra colors for transition strings
transition => [ 0 , 7 ] ,
# Default left side colors
bg_left => 0 ,
fg_left => thref( 'fg' ) ,
# Default middle colors
bg_middle => 0 ,
fg_middle => 15 ,
# Default right side background color
bg_right => 0 ,
fg_right => thref( 'fg' ) ,
# Default input prompt background color
bg_input => 0 ,
fg_input => thref( 'fg' ) ,
# Secondary prompt backaground
bg_ps2 => 0 ,
# Previous command state - OK text / background color
pcmd_ok_fg => thref( 'fg0' ) ,
# Previous command state - Error text / background color
pcmd_err_fg => thref( 'fg3' ) ,
# Git - Branch symbol
git_branch_symbol => "╟╯" ,
);
# Block-based, using green/yellow/red
$t{blocks_gyr} = {
%blocks ,
bg0 => -1 , bg1 => -1 , bg2 => -1 , bg3 => -1 ,
fg0 => 2 , fg1 => 10 , fg2 => 11 , fg3 => 9 ,
transition => [ 0 , 230 ] ,
fg_middle => 230 ,
};
# Block-based, using yellow/blue
$t{blocks_yb} = {
%blocks ,
bg0 => -1 , bg1 => -1 , bg2 => -1 , bg3 => -1 ,
fg0 => 69 , fg1 => 117 , fg2 => 178 , fg3 => 226 ,
transition => [ 0 , 189 ] ,
fg_middle => 189 ,
};
# ASCII theme, based on the blocks theme
my %ascii = (
# Padding character
padding => '-' ,
# Left side of top line
left_prefix => '\b2\f3[' ,
left_separator => '\b2\f3][' ,
left_suffix => '\b2\f3]' ,
# Middle of top line
middle_prefix => ' ' ,
middle_separator => ' | ' ,
middle_suffix => ' ' ,
# Right side of top line
right_prefix => '\b2\f3(' ,
right_separator => '\b2\f3|' ,
right_suffix => '\b2\f3)' ,
# Input line
input_prefix => '\b2\f3[' ,
input_separator => '\b2\f3][' ,
input_suffix => '\b2\f3]> ' ,
# Secondary prompt suffix
ps2_suffix => '\b2\f3| ' ,
'bg_input' => 0,
'fg_input' => 7,
'input_prefix' => '' ,
'input_separator' => '\f2:' ,
'input_suffix' => '\f2 ; ' ,
# Secondary prompt
'bg_ps2' => 0,
ps2_suffix => ' : ' ,
# Current working directory - Truncation string
cwd_trunc => '...' ,
# Current working directory - Foreground / background colors
'cwd_fg_color' => 12 ,
'cwd_bg_color' => -1 ,
# User@host - Remote host symbol
uh_remote_symbol => '(r)' ,
'uh_remote_symbol' => '(r)',
# User@host - User - Foreground and background colors
'uh_user_fg' => 10 ,
'uh_user_bg' => -1 ,
# User@host - Root - Foreground and background colors
'uh_root_fg' => 9 ,
'uh_root_bg' => -1 ,
# Date/time - Colors
'dt_time_fg' => -1 ,
'dt_date_fg' => -1 ,
'dt_bg' => -1 ,
# Previous command state - Symbols
pcmd_ok_sym => ':-)' ,
pcmd_err_sym => ':-(' ,
'pcmd_ok_sym' => 'OK',
'pcmd_err_sym' => 'ERR',
# Previous command state - OK text / background color
'pcmd_ok_fg' => -1 ,
'pcmd_ok_bg' => -1 ,
# Previous command state - Error text / background color
'pcmd_err_fg' => -1 ,
'pcmd_err_bg' => -1 ,
# Previous command state - Other text foreground
'pcmd_text_fg' => -1 ,
# Load average - Symbol or text
load_title => 'ld ' ,
'load_title' => 'ld',
# Load average - Low load colors
'load_low_fg' => -1,
'load_low_bg' => -1,
# Load average - Medium load colors
'load_med_fg' => -1 ,
'load_med_bg' => -1 ,
# Load average - High load colors
'load_high_fg' => -1 ,
'load_high_bg' => -1 ,
# Git - Branch symbol
git_branch_symbol => "B " ,
'git_branch_symbol' => 'B ',
# Git - Branch colors - No warning
'git_branch_ok_bg' => -1 ,
'git_branch_ok_fg' => -1 ,
# Git - Branch colors - Weak warning
'git_branch_warn_bg' => -1 ,
'git_branch_warn_fg' => -1 ,
# Git - Branch colors - Strong warning
'git_branch_danger_bg' => -1 ,
'git_branch_danger_fg' => -1 ,
# Git - Repo state colors
'git_repstate_bg' => -1 ,
'git_repstate_fg' => -1 ,
# Git - Padding character for status sections
'git_status_pad' => '' ,
# Git - Untracked symbol and colors
git_untracked_symbol => 'U ' ,
'git_untracked_symbol' => 'U ',
'git_untracked_bg' => -1 ,
'git_untracked_normal_fg' => -1 ,
'git_untracked_add_fg' => -1 ,
'git_untracked_mod_fg' => -1 ,
'git_untracked_del_fg' => -1 ,
# Git - Indexed symbol and colors
git_indexed_symbol => 'I ' ,
'git_indexed_symbol' => 'I ',
'git_indexed_bg' => -1 ,
'git_indexed_normal_fg' => -1 ,
'git_indexed_add_fg' => -1 ,
'git_indexed_mod_fg' => -1 ,
'git_indexed_del_fg' => -1 ,
# Git - Add/modify/delete symbols
git_add_symbol => '+' ,
git_mod_symbol => '~' ,
git_del_symbol => '-' ,
'git_add_symbol' => '+' ,
'git_mod_symbol' => '~',
'git_del_symbol' => '-',
# Git stash symbol and color
git_stash_symbol => 'S ' ,
);
$t{ascii_gyr} = { %{ $t{blocks_gyr} } , %ascii };
$t{ascii_yb} = { %{ $t{blocks_yb} } , %ascii };
'git_stash_symbol' => 'S ',
'git_stash_bg' => -1 ,
'git_stash_fg' => -1 ,
return %t;
# Python virtual environment section colors
'pyenv_fg' => -1,
'pyenv_bg' => -1,
};
}
our %THEMES;
# }}}
# }}}
# MAIN PROGRAM =============================================================={{{
@ -408,6 +229,9 @@ our $COLUMNS;
our %TCCACHE = ();
our %TLEN = ();
our %SCACHE = ();
our %THEME = ();
# Terminal commands ---------------------------------------------------------{{{
sub tput_sequence
{
@ -425,34 +249,77 @@ sub set_color
return tput_sequence( "seta$type $index" );
}
our $THEME = undef;
#}}}
# Theming support -----------------------------------------------------------{{{
sub thref($) { bless {r=>$_[0]}, 'ThemeRef'; }
sub load_theme
{
my $theme = $CONFIG{layout_theme};
return default_theme unless $theme;
my $warn = $CONFIG{cfg_warn_files};
my @tdirs = (
( map { $ENV{HOME} . '/' . $_ } @{$CONFIG{cfg_user_themes}} ) ,
@{$CONFIG{cfg_sys_themes}}
);
foreach my $dir ( @tdirs ) {
my $path = "$dir/${theme}.pm";
next unless -f $path;
my $data = do $path;
if ( $@ ) {
warn "could not parse `$path': $@" if $warn;
} elsif ( !defined $data ) {
warn "could not do `$path': $!\n" if $warn;
} elsif ( !$data ) {
warn "could not run `$path'\n" if $warn;
} elsif ( ref( $data ) ne 'HASH' ) {
warn "`$path' does not contain a hash\n" if $warn;
} else {
return $data;
}
}
return default_theme;
}
sub theme_resolve
{
my ( $theme , $key ) = @_;
my $value = $theme->{ $key };
if ( ref( $value ) eq 'ThemeRef' ) {
my $rt = exists( $value->{t} ) ? $THEMES{ $value->{t} } : $theme;
$theme->{ $key } = theme_resolve( $rt , $value->{r} );
$value = $theme->{ $key };
my ( $key , $stack ) = @_;
$stack = {} unless defined $stack;
if ( exists $stack->{ $key } ) {
warn "inifinite loop in theme ($key)\n";
return undef;
}
$stack->{ $key } = 1;
my $value = $THEME{ $key };
if ( ref( $value ) eq 'ThemeRef' ) {
$THEME{ $key } = theme_resolve( $value->{r} );
$value = $THEME{ $key };
}
return $value;
}
sub themed($)
{
my $k = shift;
unless ( defined $THEME ) {
$THEME = {
%{ $THEMES{ $CONFIG{layout_theme} } } ,
%{ $CONFIG{layout_theme_overrides} } ,
};
my @to_resolve = grep { ref($THEME->{$_}) eq 'ThemeRef' } keys %$THEME;
unless ( %THEME ) {
%THEME = ( %{ &load_theme } , %{ $CONFIG{layout_theme_overrides} } );
my @to_resolve = grep { ref( $THEME{$_} ) eq 'ThemeRef' } keys %THEME;
foreach my $k ( @to_resolve ) {
theme_resolve( $THEME , $k );
theme_resolve( $k );
}
}
return $THEME->{ $k };
return $THEME{ $k };
}
#}}}
# Rendering utilities -------------------------------------------------------{{{
sub get_section_length
{
my $section = shift;
@ -623,12 +490,15 @@ sub render
return $out;
}
#}}}
# Prompt parts --------------------------------------------------------------{{{
sub gen_top_line
{
my @left = @{ $CONFIG{layout_left} };
my @right = @{ $CONFIG{layout_right} };
my $midGen = $CONFIG{layout_middle};
return "" unless ( @left || @right || defined( $midGen ) );
return "" unless ( @left || @right || $midGen );
# Generate content
my ( @lm , @middle , @mr ) = ( );
@ -720,6 +590,9 @@ sub gen_term_title
return $out;
}
#}}}
# Configuration loader ------------------------------------------------------{{{
sub get_config_overrides
{
foreach my $k ( keys %CONFIG ) {
@ -728,7 +601,6 @@ sub get_config_overrides
next if $ev eq '';
my $vt = ref $CONFIG{ $k };
#print STDERR "$k -> SPP_" . uc($k) . " = $ev / $vt\n";
if ( !$vt ) {
$CONFIG{ $k } = $ev;
} elsif ( $vt eq 'ARRAY' ) {
@ -764,10 +636,11 @@ sub load_config
get_config_overrides if $CONFIG{cfg_from_env};
}
#}}}
sub main
{
load_config;
%THEMES = init_themes;
chop( $COLUMNS = `tput cols` );
%TLEN = compute_trans_lengths;
my $pg = gen_term_title;

131
themes/ascii_gyr.pm Normal file
View file

@ -0,0 +1,131 @@
# ascii_gyr
{
# Padding character
'padding' => '-',
# Extra colors for transition strings
'transition' => [ 0 , 230 ] ,
# Default background/foreground colors
'bg' => 0,
'fg' => 7,
# Color gradient used in various parts
fg0 => 2 , bg0 => -1 ,
fg1 => 10 , bg1 => -1 ,
fg2 => 11 , bg2 => -1 ,
fg3 => 9 , bg3 => -1 ,
# Left side of top line
'bg_left' => thref 'bg',
'fg_left' => thref 'fg',
'left_prefix' => '\b2\f3[' ,
'left_separator' => '\b2\f3][' ,
'left_suffix' => '\b2\f3]' ,
# Middle of top line
'bg_middle' => thref 'bg',
'fg_middle' => 230,
'middle_prefix' => ' ',
'middle_separator' => ' | ',
'middle_suffix' => ' ',
# Right side of top line
'bg_right' => thref 'bg',
'fg_right' => thref 'fg',
'right_prefix' => '\b2\f3(' ,
'right_separator' => '\b2\f3|' ,
'right_suffix' => '\b2\f3)' ,
# Input line
'bg_input' => thref 'bg',
'fg_input' => thref 'fg',
'input_prefix' => '\b2\f3[' ,
'input_separator' => '\b2\f3][' ,
'input_suffix' => '\b2\f3]> ' ,
# Secondary prompt
'bg_ps2' => thref 'bg',
ps2_suffix => '\b2\f3| ' ,
# Current working directory - Truncation string
cwd_trunc => '...' ,
# Current working directory - Foreground / background colors
'cwd_fg_color' => -1 ,
'cwd_bg_color' => -1 ,
# User@host - Remote host symbol
'uh_remote_symbol' => '(r)',
# User@host - User - Foreground and background colors
'uh_user_fg' => thref 'fg0' ,
'uh_user_bg' => thref 'bg0' ,
# User@host - Root - Foreground and background colors
'uh_root_fg' => thref 'fg3' ,
'uh_root_bg' => thref 'bg3' ,
# Date/time - Colors
'dt_time_fg' => -1 ,
'dt_date_fg' => -1 ,
'dt_bg' => -1 ,
# 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 ,
# Previous command state - Error text / background color
'pcmd_err_fg' => thref 'fg3',
'pcmd_err_bg' => -1 ,
# Previous command state - Other text foreground
'pcmd_text_fg' => -1 ,
# Load average - Symbol or text
'load_title' => 'ld',
# Load average - Low load colors
'load_low_fg' => -1,
'load_low_bg' => -1,
# Load average - Medium load colors
'load_med_fg' => thref 'fg2',
'load_med_bg' => thref 'bg2',
# Load average - High load colors
'load_high_fg' => thref 'fg3' ,
'load_high_bg' => thref 'bg3' ,
# Git - Branch symbol
'git_branch_symbol' => 'B ',
# Git - Branch colors - No warning
'git_branch_ok_bg' => thref 'bg0' ,
'git_branch_ok_fg' => thref 'fg0' ,
# Git - Branch colors - Weak warning
'git_branch_warn_bg' => thref 'bg2' ,
'git_branch_warn_fg' => thref 'fg2' ,
# Git - Branch colors - Strong warning
'git_branch_danger_bg' => thref 'bg3' ,
'git_branch_danger_fg' => thref 'fg3' ,
# Git - Repo state colors
'git_repstate_bg' => thref 'bg1' ,
'git_repstate_fg' => thref 'fg1' ,
# Git - Padding character for status sections
'git_status_pad' => '' ,
# Git - Untracked symbol and colors
'git_untracked_symbol' => 'U ',
'git_untracked_bg' => thref 'bg3' ,
'git_untracked_normal_fg' => thref 'fg3' ,
'git_untracked_add_fg' => thref 'fg3' ,
'git_untracked_mod_fg' => thref 'fg3' ,
'git_untracked_del_fg' => thref 'fg3' ,
# Git - Indexed symbol and colors
'git_indexed_symbol' => 'I ',
'git_indexed_bg' => thref 'bg2' ,
'git_indexed_normal_fg' => thref 'fg2' ,
'git_indexed_add_fg' => thref 'fg2' ,
'git_indexed_mod_fg' => thref 'fg2' ,
'git_indexed_del_fg' => thref 'fg2' ,
# Git - Add/modify/delete symbols
'git_add_symbol' => '+' ,
'git_mod_symbol' => '~',
'git_del_symbol' => '-',
# Git stash symbol and color
'git_stash_symbol' => 'S ',
'git_stash_bg' => thref 'bg1' ,
'git_stash_fg' => thref 'fg1' ,
# Python virtual environment section colors
'pyenv_fg' => -1,
'pyenv_bg' => -1,
}

131
themes/ascii_yb.pm Normal file
View file

@ -0,0 +1,131 @@
# ascii_yb
{
# Padding character
'padding' => '-',
# Extra colors for transition strings
'transition' => [ 0 , 189 ] ,
# Default background/foreground colors
'bg' => 0,
'fg' => 7,
# Color gradient used in various parts
fg0 => 69 , bg0 => -1 ,
fg1 => 117 , bg1 => -1 ,
fg2 => 178 , bg2 => -1 ,
fg3 => 226 , bg3 => -1 ,
# Left side of top line
'bg_left' => thref 'bg',
'fg_left' => thref 'fg',
'left_prefix' => '\b2\f3[' ,
'left_separator' => '\b2\f3][' ,
'left_suffix' => '\b2\f3]' ,
# Middle of top line
'bg_middle' => thref 'bg',
'fg_middle' => 189,
'middle_prefix' => ' ',
'middle_separator' => ' | ',
'middle_suffix' => ' ',
# Right side of top line
'bg_right' => thref 'bg',
'fg_right' => thref 'fg',
'right_prefix' => '\b2\f3(' ,
'right_separator' => '\b2\f3|' ,
'right_suffix' => '\b2\f3)' ,
# Input line
'bg_input' => thref 'bg',
'fg_input' => thref 'fg',
'input_prefix' => '\b2\f3[' ,
'input_separator' => '\b2\f3][' ,
'input_suffix' => '\b2\f3]> ' ,
# Secondary prompt
'bg_ps2' => thref 'bg',
ps2_suffix => '\b2\f3| ' ,
# Current working directory - Truncation string
cwd_trunc => '...' ,
# Current working directory - Foreground / background colors
'cwd_fg_color' => -1 ,
'cwd_bg_color' => -1 ,
# User@host - Remote host symbol
'uh_remote_symbol' => '(r)',
# User@host - User - Foreground and background colors
'uh_user_fg' => thref 'fg0' ,
'uh_user_bg' => thref 'bg0' ,
# User@host - Root - Foreground and background colors
'uh_root_fg' => thref 'fg3' ,
'uh_root_bg' => thref 'bg3' ,
# Date/time - Colors
'dt_time_fg' => -1 ,
'dt_date_fg' => -1 ,
'dt_bg' => -1 ,
# 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 ,
# Previous command state - Error text / background color
'pcmd_err_fg' => thref 'fg3',
'pcmd_err_bg' => -1 ,
# Previous command state - Other text foreground
'pcmd_text_fg' => -1 ,
# Load average - Symbol or text
'load_title' => 'ld',
# Load average - Low load colors
'load_low_fg' => -1,
'load_low_bg' => -1,
# Load average - Medium load colors
'load_med_fg' => thref 'fg2',
'load_med_bg' => thref 'bg2',
# Load average - High load colors
'load_high_fg' => thref 'fg3' ,
'load_high_bg' => thref 'bg3' ,
# Git - Branch symbol
'git_branch_symbol' => 'B ',
# Git - Branch colors - No warning
'git_branch_ok_bg' => thref 'bg0' ,
'git_branch_ok_fg' => thref 'fg0' ,
# Git - Branch colors - Weak warning
'git_branch_warn_bg' => thref 'bg2' ,
'git_branch_warn_fg' => thref 'fg2' ,
# Git - Branch colors - Strong warning
'git_branch_danger_bg' => thref 'bg3' ,
'git_branch_danger_fg' => thref 'fg3' ,
# Git - Repo state colors
'git_repstate_bg' => thref 'bg1' ,
'git_repstate_fg' => thref 'fg1' ,
# Git - Padding character for status sections
'git_status_pad' => '' ,
# Git - Untracked symbol and colors
'git_untracked_symbol' => 'U ',
'git_untracked_bg' => thref 'bg3' ,
'git_untracked_normal_fg' => thref 'fg3' ,
'git_untracked_add_fg' => thref 'fg3' ,
'git_untracked_mod_fg' => thref 'fg3' ,
'git_untracked_del_fg' => thref 'fg3' ,
# Git - Indexed symbol and colors
'git_indexed_symbol' => 'I ',
'git_indexed_bg' => thref 'bg2' ,
'git_indexed_normal_fg' => thref 'fg2' ,
'git_indexed_add_fg' => thref 'fg2' ,
'git_indexed_mod_fg' => thref 'fg2' ,
'git_indexed_del_fg' => thref 'fg2' ,
# Git - Add/modify/delete symbols
'git_add_symbol' => '+' ,
'git_mod_symbol' => '~',
'git_del_symbol' => '-',
# Git stash symbol and color
'git_stash_symbol' => 'S ',
'git_stash_bg' => thref 'bg1' ,
'git_stash_fg' => thref 'fg1' ,
# Python virtual environment section colors
'pyenv_fg' => -1,
'pyenv_bg' => -1,
}

131
themes/blocks_gyr.pm Normal file
View file

@ -0,0 +1,131 @@
# blocks_gyr
{
# Padding character
'padding' => "\x{2500}",
# Extra colors for transition strings
'transition' => [ 0 , 230 ] ,
# Default background/foreground colors
'bg' => 0,
'fg' => 7,
# Color gradient used in various parts
fg0 => 2 , bg0 => -1 ,
fg1 => 10 , bg1 => -1 ,
fg2 => 11 , bg2 => -1 ,
fg3 => 9 , bg3 => -1 ,
# Left side of top line
'bg_left' => thref 'bg',
'fg_left' => thref 'fg',
'left_prefix' => "\\b2\\f3\x{256d}\x{2504} ",
'left_separator' => "\\b2\\f3 \x{2508} ",
'left_suffix' => "\\b2\\f3 \x{2504}\x{2562}",
# Middle of top line
'bg_middle' => thref 'bg',
'fg_middle' => 230,
'middle_prefix' => ' ',
'middle_separator' => ' | ',
'middle_suffix' => ' ',
# Right side of top line
'bg_right' => thref 'bg',
'fg_right' => thref 'fg',
'right_prefix' => "\\b2\\f3\x{256b}\x{2504} ",
'right_separator' => "\\b2\\f3 \x{2508} ",
'right_suffix' => "\\b2\\f3 \x{2504}(",
# Input line
'bg_input' => thref 'bg',
'fg_input' => thref 'fg',
'input_prefix' => "\\b2\\f3\x{2570}\x{2504}",
'input_separator' => "\\b2\\f3\x{2508}",
'input_suffix' => "\\b2\\f3\x{2500}> ",
# Secondary prompt
'bg_ps2' => thref 'bg',
'ps2_suffix' => "\\b2\\f3\x{250a} ",
# Current working directory - Truncation string
'cwd_trunc' => "\x{2026}",
# Current working directory - Foreground / background colors
'cwd_fg_color' => -1 ,
'cwd_bg_color' => -1 ,
# User@host - Remote host symbol
'uh_remote_symbol' => "\x{21a5}",
# User@host - User - Foreground and background colors
'uh_user_fg' => thref 'fg0' ,
'uh_user_bg' => thref 'bg0' ,
# User@host - Root - Foreground and background colors
'uh_root_fg' => thref 'fg3' ,
'uh_root_bg' => thref 'bg3' ,
# Date/time - Colors
'dt_time_fg' => -1 ,
'dt_date_fg' => -1 ,
'dt_bg' => -1 ,
# 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 ,
# Previous command state - Error text / background color
'pcmd_err_fg' => thref 'fg3',
'pcmd_err_bg' => -1 ,
# Previous command state - Other text foreground
'pcmd_text_fg' => -1 ,
# Load average - Symbol or text
'load_title' => "\x{219f}",
# Load average - Low load colors
'load_low_fg' => -1,
'load_low_bg' => -1,
# Load average - Medium load colors
'load_med_fg' => thref 'fg2',
'load_med_bg' => thref 'bg2',
# Load average - High load colors
'load_high_fg' => thref 'fg3' ,
'load_high_bg' => thref 'bg3' ,
# Git - Branch symbol
'git_branch_symbol' => "\x{255f}\x{256f}",
# Git - Branch colors - No warning
'git_branch_ok_bg' => thref 'bg0' ,
'git_branch_ok_fg' => thref 'fg0' ,
# Git - Branch colors - Weak warning
'git_branch_warn_bg' => thref 'bg2' ,
'git_branch_warn_fg' => thref 'fg2' ,
# Git - Branch colors - Strong warning
'git_branch_danger_bg' => thref 'bg3' ,
'git_branch_danger_fg' => thref 'fg3' ,
# Git - Repo state colors
'git_repstate_bg' => thref 'bg1' ,
'git_repstate_fg' => thref 'fg1' ,
# Git - Padding character for status sections
'git_status_pad' => '' ,
# Git - Untracked symbol and colors
'git_untracked_symbol' => "\x{2744}",
'git_untracked_bg' => thref 'bg3' ,
'git_untracked_normal_fg' => thref 'fg3' ,
'git_untracked_add_fg' => thref 'fg3' ,
'git_untracked_mod_fg' => thref 'fg3' ,
'git_untracked_del_fg' => thref 'fg3' ,
# Git - Indexed symbol and colors
'git_indexed_symbol' => "\x{2630}",
'git_indexed_bg' => thref 'bg2' ,
'git_indexed_normal_fg' => thref 'fg2' ,
'git_indexed_add_fg' => thref 'fg2' ,
'git_indexed_mod_fg' => thref 'fg2' ,
'git_indexed_del_fg' => thref 'fg2' ,
# Git - Add/modify/delete symbols
'git_add_symbol' => '+' ,
'git_mod_symbol' => "\x{b1}",
'git_del_symbol' => "\x{2205}",
# Git stash symbol and color
'git_stash_symbol' => "\x{2021}",
'git_stash_bg' => thref 'bg1' ,
'git_stash_fg' => thref 'fg1' ,
# Python virtual environment section colors
'pyenv_fg' => -1,
'pyenv_bg' => -1,
}

131
themes/blocks_yb.pm Normal file
View file

@ -0,0 +1,131 @@
# blocks_yb
{
# Padding character
'padding' => "\x{2500}",
# Extra colors for transition strings
'transition' => [ 0, 189 ],
# Default background/foreground colors
'bg' => 0,
'fg' => 7,
# Color gradient used in various parts
fg0 => 69, bg0 => -1,
fg1 => 117, bg1 => -1,
fg2 => 178, bg2 => -1,
fg3 => 226, bg3 => -1,
# Left side of top line
'bg_left' => thref 'bg',
'fg_left' => thref 'fg',
'left_prefix' => "\\b2\\f3\x{256d}\x{2504} ",
'left_separator' => "\\b2\\f3 \x{2508} ",
'left_suffix' => "\\b2\\f3 \x{2504}\x{2562}",
# Middle of top line
'bg_middle' => thref 'bg',
'fg_middle' => 189,
'middle_prefix' => ' ',
'middle_separator' => ' | ',
'middle_suffix' => ' ',
# Right side of top line
'bg_right' => thref 'bg',
'fg_right' => thref 'fg',
'right_prefix' => "\\b2\\f3\x{256b}\x{2504} ",
'right_separator' => "\\b2\\f3 \x{2508} ",
'right_suffix' => "\\b2\\f3 \x{2504}(",
# Input line
'bg_input' => thref 'bg',
'fg_input' => thref 'fg',
'input_prefix' => "\\b2\\f3\x{2570}\x{2504}",
'input_separator' => "\\b2\\f3\x{2508}",
'input_suffix' => "\\b2\\f3\x{2500}> ",
# Secondary prompt
'bg_ps2' => thref 'bg',
'ps2_suffix' => "\\b2\\f3\x{250a} ",
# Current working directory - Truncation string
'cwd_trunc' => "\x{2026}",
# Current working directory - Foreground / background colors
'cwd_fg_color' => -1 ,
'cwd_bg_color' => -1 ,
# User@host - Remote host symbol
'uh_remote_symbol' => "\x{21a5}",
# User@host - User - Foreground and background colors
'uh_user_fg' => thref 'fg0' ,
'uh_user_bg' => thref 'bg0' ,
# User@host - Root - Foreground and background colors
'uh_root_fg' => thref 'fg3' ,
'uh_root_bg' => thref 'bg3' ,
# Date/time - Colors
'dt_time_fg' => -1 ,
'dt_date_fg' => -1 ,
'dt_bg' => -1 ,
# 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 ,
# Previous command state - Error text / background color
'pcmd_err_fg' => thref 'fg3',
'pcmd_err_bg' => -1 ,
# Previous command state - Other text foreground
'pcmd_text_fg' => -1 ,
# Load average - Symbol or text
'load_title' => "\x{219f}",
# Load average - Low load colors
'load_low_fg' => -1,
'load_low_bg' => -1,
# Load average - Medium load colors
'load_med_fg' => thref 'fg2',
'load_med_bg' => thref 'bg2',
# Load average - High load colors
'load_high_fg' => thref 'fg3' ,
'load_high_bg' => thref 'bg3' ,
# Git - Branch symbol
'git_branch_symbol' => "\x{255f}\x{256f}",
# Git - Branch colors - No warning
'git_branch_ok_bg' => thref 'bg0' ,
'git_branch_ok_fg' => thref 'fg0' ,
# Git - Branch colors - Weak warning
'git_branch_warn_bg' => thref 'bg2' ,
'git_branch_warn_fg' => thref 'fg2' ,
# Git - Branch colors - Strong warning
'git_branch_danger_bg' => thref 'bg3' ,
'git_branch_danger_fg' => thref 'fg3' ,
# Git - Repo state colors
'git_repstate_bg' => thref 'bg1' ,
'git_repstate_fg' => thref 'fg1' ,
# Git - Padding character for status sections
'git_status_pad' => '' ,
# Git - Untracked symbol and colors
'git_untracked_symbol' => "\x{2744}",
'git_untracked_bg' => thref 'bg3' ,
'git_untracked_normal_fg' => thref 'fg3' ,
'git_untracked_add_fg' => thref 'fg3' ,
'git_untracked_mod_fg' => thref 'fg3' ,
'git_untracked_del_fg' => thref 'fg3' ,
# Git - Indexed symbol and colors
'git_indexed_symbol' => "\x{2630}",
'git_indexed_bg' => thref 'bg2' ,
'git_indexed_normal_fg' => thref 'fg2' ,
'git_indexed_add_fg' => thref 'fg2' ,
'git_indexed_mod_fg' => thref 'fg2' ,
'git_indexed_del_fg' => thref 'fg2' ,
# Git - Add/modify/delete symbols
'git_add_symbol' => '+' ,
'git_mod_symbol' => "\x{b1}",
'git_del_symbol' => "\x{2205}",
# Git stash symbol and color
'git_stash_symbol' => "\x{2021}",
'git_stash_bg' => thref 'bg1' ,
'git_stash_fg' => thref 'fg1' ,
# Python virtual environment section colors
'pyenv_fg' => -1,
'pyenv_bg' => -1,
}

130
themes/powerline_gyr.pm Normal file
View file

@ -0,0 +1,130 @@
# powerline_gyr
{
# Padding character
'padding' => ' ',
# Extra colors for transition strings
'transition' => [ 233 ] ,
# Default foreground color
'fg' => 15,
# Color gradient used in various parts
fg0 => 0 , bg0 => 2 ,
fg1 => 0 , bg1 => 10 ,
fg2 => 0 , bg2 => 11 ,
fg3 => 11, bg3 => 1 ,
# Left side of top line
'bg_left' => 239,
'fg_left' => thref 'fg',
'left_prefix' => '\b1 ' ,
'left_separator' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}" ,
'left_suffix' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Middle of top line
'bg_middle' => 235,
'fg_middle' => thref 'fg',
'middle_prefix' => '',
'middle_separator' => ' | ',
'middle_suffix' => '',
# Right side of top line
'bg_right' => 239,
'fg_right' => thref 'fg',
'right_prefix' => '\f2\b0'."\x{e0b2}".'\f1\b2'."\x{e0b2}".'\b1' ,
'right_separator' => '\f2\b0'."\x{e0b2}".'\f1\b2'."\x{e0b2}" ,
'right_suffix' => '\b0 ' ,
# Input line
'bg_input' => 238,
'fg_input' => thref 'fg',
'input_prefix' => '\b1 ' ,
'input_separator' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}" ,
'input_suffix' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Secondary prompt
'bg_ps2' => 234,
'ps2_suffix' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Current working directory - Truncation string
'cwd_trunc' => "\x{2026}",
# Current working directory - Foreground / background colors
'cwd_fg_color' => -1 ,
'cwd_bg_color' => -1 ,
# User@host - Remote host symbol
'uh_remote_symbol' => "\x{21a5}",
# User@host - User - Foreground and background colors
'uh_user_fg' => thref 'fg0' ,
'uh_user_bg' => thref 'bg0' ,
# User@host - Root - Foreground and background colors
'uh_root_fg' => thref 'fg3' ,
'uh_root_bg' => thref 'bg3' ,
# Date/time - Colors
'dt_time_fg' => -1 ,
'dt_date_fg' => -1 ,
'dt_bg' => -1 ,
# 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 ,
# 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 ,
# Load average - Symbol or text
'load_title' => "\x{219f}",
# Load average - Low load colors
'load_low_fg' => -1,
'load_low_bg' => -1,
# Load average - Medium load colors
'load_med_fg' => thref 'fg2',
'load_med_bg' => thref 'bg2',
# Load average - High load colors
'load_high_fg' => thref 'fg3' ,
'load_high_bg' => thref 'bg3' ,
# Git - Branch symbol
'git_branch_symbol' => "\x{e0a0} " ,
# Git - Branch colors - No warning
'git_branch_ok_bg' => thref 'bg0' ,
'git_branch_ok_fg' => thref 'fg0' ,
# Git - Branch colors - Weak warning
'git_branch_warn_bg' => thref 'bg2' ,
'git_branch_warn_fg' => thref 'fg2' ,
# Git - Branch colors - Strong warning
'git_branch_danger_bg' => thref 'bg3' ,
'git_branch_danger_fg' => thref 'fg3' ,
# Git - Repo state colors
'git_repstate_bg' => thref 'bg1' ,
'git_repstate_fg' => thref 'fg1' ,
# Git - Padding character for status sections
'git_status_pad' => '' ,
# Git - Untracked symbol and colors
'git_untracked_symbol' => "\x{2744}",
'git_untracked_bg' => thref 'bg3' ,
'git_untracked_normal_fg' => thref 'fg3' ,
'git_untracked_add_fg' => thref 'fg3' ,
'git_untracked_mod_fg' => thref 'fg3' ,
'git_untracked_del_fg' => thref 'fg3' ,
# Git - Indexed symbol and colors
'git_indexed_symbol' => "\x{2630}",
'git_indexed_bg' => thref 'bg2' ,
'git_indexed_normal_fg' => thref 'fg2' ,
'git_indexed_add_fg' => thref 'fg2' ,
'git_indexed_mod_fg' => thref 'fg2' ,
'git_indexed_del_fg' => thref 'fg2' ,
# Git - Add/modify/delete symbols
'git_add_symbol' => '+' ,
'git_mod_symbol' => "\x{b1}",
'git_del_symbol' => "\x{2205}",
# Git stash symbol and color
'git_stash_symbol' => "\x{2021}",
'git_stash_bg' => thref 'bg1' ,
'git_stash_fg' => thref 'fg1' ,
# Python virtual environment section colors
'pyenv_fg' => -1,
'pyenv_bg' => -1,
}

130
themes/powerline_yb.pm Normal file
View file

@ -0,0 +1,130 @@
# powerline_gyr
{
# Padding character
'padding' => ' ',
# Extra colors for transition strings
'transition' => [ 233 ] ,
# Default foreground color
'fg' => 15,
# Color gradient used in various parts
fg0 => 226 , bg0 => 21 ,
fg1 => 184 , bg1 => 61 ,
fg2 => 21 , bg2 => 143 ,
fg3 => 18 , bg3 => 226 ,
# Left side of top line
'bg_left' => 239,
'fg_left' => thref 'fg',
'left_prefix' => '\b1 ' ,
'left_separator' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}" ,
'left_suffix' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Middle of top line
'bg_middle' => 235,
'fg_middle' => thref 'fg',
'middle_prefix' => '',
'middle_separator' => ' | ',
'middle_suffix' => '',
# Right side of top line
'bg_right' => 239,
'fg_right' => thref 'fg',
'right_prefix' => '\f2\b0'."\x{e0b2}".'\f1\b2'."\x{e0b2}".'\b1' ,
'right_separator' => '\f2\b0'."\x{e0b2}".'\f1\b2'."\x{e0b2}" ,
'right_suffix' => '\b0 ' ,
# Input line
'bg_input' => 238,
'fg_input' => thref 'fg',
'input_prefix' => '\b1 ' ,
'input_separator' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}" ,
'input_suffix' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Secondary prompt
'bg_ps2' => 234,
'ps2_suffix' => '\f0\b2'."\x{e0b0}".'\f2\b1'."\x{e0b0}".' ' ,
# Current working directory - Truncation string
'cwd_trunc' => "\x{2026}",
# Current working directory - Foreground / background colors
'cwd_fg_color' => -1 ,
'cwd_bg_color' => -1 ,
# User@host - Remote host symbol
'uh_remote_symbol' => "\x{21a5}",
# User@host - User - Foreground and background colors
'uh_user_fg' => thref 'fg0' ,
'uh_user_bg' => thref 'bg0' ,
# User@host - Root - Foreground and background colors
'uh_root_fg' => thref 'fg3' ,
'uh_root_bg' => thref 'bg3' ,
# Date/time - Colors
'dt_time_fg' => -1 ,
'dt_date_fg' => -1 ,
'dt_bg' => -1 ,
# 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 ,
# Previous command state - Error text / background color
'pcmd_err_fg' => thref( 'fg0' ) ,
'pcmd_err_bg' => -1 ,
# Previous command state - Other text foreground
'pcmd_text_fg' => -1 ,
# Load average - Symbol or text
'load_title' => "\x{219f}",
# Load average - Low load colors
'load_low_fg' => -1,
'load_low_bg' => -1,
# Load average - Medium load colors
'load_med_fg' => thref 'fg2',
'load_med_bg' => thref 'bg2',
# Load average - High load colors
'load_high_fg' => thref 'fg3' ,
'load_high_bg' => thref 'bg3' ,
# Git - Branch symbol
'git_branch_symbol' => "\x{e0a0} " ,
# Git - Branch colors - No warning
'git_branch_ok_bg' => thref 'bg0' ,
'git_branch_ok_fg' => thref 'fg0' ,
# Git - Branch colors - Weak warning
'git_branch_warn_bg' => thref 'bg2' ,
'git_branch_warn_fg' => thref 'fg2' ,
# Git - Branch colors - Strong warning
'git_branch_danger_bg' => thref 'bg3' ,
'git_branch_danger_fg' => thref 'fg3' ,
# Git - Repo state colors
'git_repstate_bg' => thref 'bg1' ,
'git_repstate_fg' => thref 'fg1' ,
# Git - Padding character for status sections
'git_status_pad' => '' ,
# Git - Untracked symbol and colors
'git_untracked_symbol' => "\x{2744}",
'git_untracked_bg' => thref 'bg3' ,
'git_untracked_normal_fg' => thref 'fg3' ,
'git_untracked_add_fg' => thref 'fg3' ,
'git_untracked_mod_fg' => thref 'fg3' ,
'git_untracked_del_fg' => thref 'fg3' ,
# Git - Indexed symbol and colors
'git_indexed_symbol' => "\x{2630}",
'git_indexed_bg' => thref 'bg2' ,
'git_indexed_normal_fg' => thref 'fg2' ,
'git_indexed_add_fg' => thref 'fg2' ,
'git_indexed_mod_fg' => thref 'fg2' ,
'git_indexed_del_fg' => thref 'fg2' ,
# Git - Add/modify/delete symbols
'git_add_symbol' => '+' ,
'git_mod_symbol' => "\x{b1}",
'git_del_symbol' => "\x{2205}",
# Git stash symbol and color
'git_stash_symbol' => "\x{2021}",
'git_stash_bg' => thref 'bg1' ,
'git_stash_fg' => thref 'fg1' ,
# Python virtual environment section colors
'pyenv_fg' => -1,
'pyenv_bg' => -1,
}