Skip to content

jactry/zsh_battery_state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

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 jactry92@gmail.com Thank you!

About

A plugin for zsh to display the state of battery in right-prompt.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages