-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
40 lines (20 loc) · 797 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
zsh-battery-state by Jactry
zsh-battery-state is a plugin to display the state of battery in zsh.
1.Install oh-my-zsh
Follow the guide here:https://github.com/robbyrussell/oh-my-zsh
2.Clone zshbatterystate from GitCafé
git clone git://gitcafe.com/Jactry/zsh_battery_state.git ~/.oh-my-zsh/plugins/zsh-battery-state
3.Set zsh to support it
Add this to your ~/.zshrc :
function battery_display {
BAT_STATE=~/.oh-my-zsh/plugins/zsh-battery-state/battery_state.py
echo `$BAT_STATE` 2>/dev/null
}
RPROMPT='$(battery_display)'
Note:
If does not work in your zsh,please check your .zshrc and make sure it include this:
ZSH=$HOME/.oh-my-zsh
source $ZSH/oh-my-zsh.sh
Enjoy it!
And if you meet some problem when you use it please contact me.
My EMail is [email protected] Thank you!