Spaceship-prompt: [Battery] Battery Icon won't turn off.

Created on 22 Aug 2017  路  5Comments  路  Source: denysdovhan/spaceship-prompt

Issue

Battery icon won't disappear, despite being switched off in the .zshrc.

Sample of my .zshrc:

# Spaceship
...
SPACESHIP_BATTERY_SHOW=false
SPACESHIP_BATTERY_ALWAYS_SHOW=false
...

Battery appears to work correctly (only showing up at 100% or below 10%), just insists on staying even when switched off.

Screenshot

screenshot

Environment

Operating system: macOS 10.12.6
Terminal emulator: iTerm2 3.0.15
ZSH version: zsh 5.2 (x86_64-apple-darwin16.0)

Relevant .zshrc

Full .zshrc available in my dotfiles.

bug

Most helpful comment

Thanks for the fix!

All 5 comments

@sfarzy could you check this?

I am having the same issue, with a slightly different config:
macOS 10.12.6
Iterm Build 3.1.20170821-nightly
zsh 5.4.1 (x86_64-apple-darwin16.7.0)

I have also set SPACESHIP_BATTERY_SHOW=false and SPACESHIP_BATTERY_ALWAYS_SHOW=false in my .zshrc.

Screenshot (plugged in):
screen shot 2017-08-22 at 2 43 12 pm

As with @Vvkmnn, the indicator disappears when actually on battery power (though I haven't confirmed if it shows up again once below 10%).

Really sorry for this, It was caused by typo in _BATTERY_SHOW variable.
https://github.com/denysdovhan/spaceship-zsh-theme/blob/84c562879de082aafd4e0725c5b32f0cace12c68/spaceship.zsh#L266
I'm not sure how we missed it 馃槓

Thanks for the fix!

Yep, that's fixed it for me too.

Thanks guys.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nfischer picture nfischer  路  3Comments

jwhipp picture jwhipp  路  3Comments

ChadTaljaardt picture ChadTaljaardt  路  4Comments

salmanulfarzy picture salmanulfarzy  路  3Comments

MatthiasJ picture MatthiasJ  路  4Comments