diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-09-16 11:02:26 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-09-16 11:03:08 -0400 |
commit | b429e90cf4bd9c7ab336d815ff0603505acda736 (patch) | |
tree | 1cc8e36283f55007f37d563a348dcfdf7f05dd9d /bin | |
parent | 09229c90ff171dfb9c233782ea8c8bdb722f87b6 (diff) | |
download | conf-b429e90cf4bd9c7ab336d815ff0603505acda736.tar.gz conf-b429e90cf4bd9c7ab336d815ff0603505acda736.zip |
color tweaks
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fancy-prompt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bin/fancy-prompt b/bin/fancy-prompt index d398076..36eebf5 100755 --- a/bin/fancy-prompt +++ b/bin/fancy-prompt @@ -76,7 +76,7 @@ my %colornames = ( user => 'lightblue', root => 'lightred', - path => 'blue', + path => 'lightblue', ropath => 'red', vcs => 'cyan', @@ -84,8 +84,9 @@ my %colornames = ( battwarn => 'brown', battcrit => 'red', battemerg => 'lightred', + battfull => 'green', - time => 'blue', + time => 'darkgrey', background => 'darkgrey', reset => 'reset', @@ -94,11 +95,12 @@ $colornames{hostname} = $colornames{$hostname} || $colornames{unknown_host}; $colornames{user} = $colornames{root} if $root; $colornames{path} = $colornames{ropath} unless -w $pwd; $colornames{error} = $colornames{background} unless $err; -$colornames{battery} = $charging ? $colornames{background} +$colornames{battery} = $battery >= 80 ? $colornames{battfull} + : $charging ? $colornames{background} : !defined($battery) ? $colornames{battemerg} - : $battery > 40 ? $colornames{background} - : $battery > 15 ? $colornames{battwarn} - : $battery > 5 ? $colornames{battcrit} + : $battery >= 40 ? $colornames{background} + : $battery >= 15 ? $colornames{battwarn} + : $battery >= 5 ? $colornames{battcrit} : $colornames{battemerg}; sub color { my $code = $colors{$colornames{$_[0]}}; |