diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-02-18 19:01:01 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-02-18 19:01:21 -0600 |
commit | 0a7b45d752df0f61588013fc828f5daaf67981b5 (patch) | |
tree | 7c0d753081659390619c113474575bb335c0a294 /bin | |
parent | 7561e6a567b7dd73735df93d77ee4310a958628a (diff) | |
download | conf-0a7b45d752df0f61588013fc828f5daaf67981b5.tar.gz conf-0a7b45d752df0f61588013fc828f5daaf67981b5.zip |
don't color battery meter if we're on ac power
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fancy-prompt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/fancy-prompt b/bin/fancy-prompt index a67377a..b9cb193 100755 --- a/bin/fancy-prompt +++ b/bin/fancy-prompt @@ -93,7 +93,8 @@ $colornames{hostname} = $colornames{$hostname}; $colornames{user} = $colornames{root} if $root; $colornames{path} = $colornames{ropath} unless -w $pwd; $colornames{error} = $colornames{background} unless $err; -$colornames{battery} = !defined($battery) ? $colornames{battemerg} +$colornames{battery} = $charging ? $colornames{background} + : !defined($battery) ? $colornames{battemerg} : $battery > 40 ? $colornames{background} : $battery > 15 ? $colornames{battwarn} : $battery > 5 ? $colornames{battcrit} |