App-PS1
view release on metacpan or search on metacpan
Cleaned up boiler plate text (Ivan Wills)
Started documenting methods (Ivan Wills)
Removed non-existant files (Ivan Wills)
Updated package files (Ivan Wills)
Added setting the theme from the environment (Ivan Wills)
Added green theme (Ivan Wills)
Removed warn (Ivan Wills)
Converted colours to use themes (Ivan Wills)
Passing more things on (Ivan Wills)
Some rationalisation of plugins and cleanup (Ivan Wills)
Changed it so that the background colour can be configured by an environment variable (Ivan Wills)
Removed colon (Ivan Wills)
Added space (Ivan Wills)
Added all recommended modules (Ivan Wills)
Added configure_requires section (Ivan Wills)
Merge branch 'master' of https://github.com/ivanwills/App-PS1 (Ivan Wills)
Updated generated files (Ivan Wills)
Stopped Perl::Critic complaining about stuff (Ivan Wills)
Updated stopwords (Ivan Wills)
Corrected copyright (Ivan Wills)
Updated license text (Ivan Wills)
=item C<$UNICODE_UNSAFE>
If set to a true value this will allow UTF8 characters to be used displaying
the prompt
Default not set
=item C<$APP_PS1_BACKGROUND>
Set the line's background colour
Default 52
=back
=head1 SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
bin/app-ps1 view on Meta::CPAN
=item C<$UNICODE_UNSAFE>
If set to a true value this will allow UTF8 characters to be used displaying
the prompt
Default not set
=item C<$APP_PS1_BACKGROUND>
Set the line's background colour
Default 52
=back
=head1 DEPENDENCIES
=head1 INCOMPATIBILITIES
=head1 BUGS AND LIMITATIONS
lib/App/PS1.pm view on Meta::CPAN
eval { require Term::Colour256 };
my $t256 = !$EVAL_ERROR;
our $VERSION = 0.08;
__PACKAGE__->mk_accessors(qw/ ps1 cols plugins bw low exit parts safe theme verbose/);
my %theme = (
default => {
# name Low Colour Hi Colour
background => [ 'black' , 'on_52' ],
marker => [ 'black' , 246 ],
up_time => [ 'yellow', 'yellow' ],
up_label => [ 'black' , 'black' ],
branch => [ 'cyan' , 'cyan' ],
branch_label => [ 'black' , 'black' ],
date => [ 'red' , 'red' ],
face_happy => [ 'green' , 46 ],
face_sad => [ 'red' , 202 ],
dir_name => [ 'white' , 'white' ],
dir_label => [ 'black' , 'black' ],
dir_size => [ 'cyan' , 'cyan' ],
},
green => {
# name Low Colour Hi Colour
background => [ 'on_green', 'on_22' ],
marker => [ 'black' , 246 ],
up_time => [ 'yellow' , 'yellow' ],
up_label => [ 'black' , 'black' ],
branch => [ 'white' , 190 ],
branch_label => [ 'black' , 'black' ],
date => [ 'red' , 9 ],
face_happy => [ 'green' , 46 ],
face_sad => [ 'red' , 202 ],
dir_name => [ 'blue' , 21 ],
dir_label => [ 'black' , 'black' ],
dir_size => [ 'cyan' , 33 ],
},
blue => {
# name Low Colour Hi Colour
background => [ 'on_blue' , 'on_30' ],
marker => [ 'black' , 236 ],
up_time => [ 'yellow' , 'yellow' ],
up_label => [ 'black' , 'black' ],
branch => [ 'white' , 190 ],
branch_label => [ 'black' , 'black' ],
date => [ 'red' , 52 ],
face_happy => [ 'green' , 46 ],
face_sad => [ 'red' , 52 ],
dir_name => [ 'blue' , 21 ],
dir_label => [ 'black' , 'black' ],
lib/App/PS1.pm view on Meta::CPAN
$spare -= int $extra;
$extra = $extra - int $extra;
}
}
if ( $extra > 0.1 ) {
$line .= ' ';
}
$line .= $self->parts->[-1][1];
my $colour = $ENV{APP_PS1_BACKGROUND} || 52;
$out = $self->colour('background') . $line . "\e[0m\n";
}
return $out;
}
sub parse_options {
my ($self, $options_txt, $name) = @_;
return {} if !$options_txt;
lib/App/PS1.pm view on Meta::CPAN
=item C<$UNICODE_UNSAFE>
If set to a true value this will allow UTF8 characters to be used displaying
the prompt
Default not set
=item C<$APP_PS1_BACKGROUND>
Set the line's background colour
Default 52
=back
=head1 DEPENDENCIES
=head1 INCOMPATIBILITIES
=head1 BUGS AND LIMITATIONS
( run in 0.806 second using v1.01-cache-2.11-cpan-d8267643d1d )