battery unicode art on your tmux sessions or the terminal.
(2022-07-29)
macOS build artifacts are cgo-less now!!
use goreleaser to release artifacts.
(2019-11-03)
Supported to display patched fonts.
Very Thanks TsutomuNakamura!!
Let's run battery -i
after installed patched fonts. See more details.
(2018-05-01)
Supported to show elapsed time.
Very Thanks delphinus!!
Let's run battery -e
(2016-10-24)
linux supported.
Thanks mattn!!
(2016-10-21)
windows supported.
(2016-10-20)
Now, this command can use mac user only.
However, I hope to support windows and linux, bsd in future.
So, plz help me (´;ω;`)
$ brew update
$ brew install Code-Hex/tap/battery
$ go install github.com/Code-Hex/battery/cmd/battery@latest
You can download from here
For tmux user, please write #(battery -t)
in your .tmux.conf
Please refer to this
You can display the status of battery with patched fonts. Installing the font, Inconsolata Nerd Font Complete.otf for example, you can do it like below.
- For mac
cd ~/Library/Fonts/
wget https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/Inconsolata/complete/Inconsolata%20Nerd%20Font%20Complete.otf
- For Linux
cd ~/.local/share/fonts
wget https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/Inconsolata/complete/Inconsolata%20Nerd%20Font%20Complete.otf
- For Windows
* Open your browser then fill this url
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/Inconsolata/complete/Inconsolata%20Nerd%20Font%20Complete.otf
* Double click the file that you downloaded and the window will be opened
* Click the install button
Your environment might require to reboot the OS. If so, reboot your OS. Then open your terminal and set your preferences to use it.
Then for tmux user, please write #(battery -t -i)
in your .tmux.conf
.