A tiny Go program that outputs your Macbook's battery state as emoji. For your shell prompt.
Go Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
Makefile
README.md
battery-emoji.go

README.md

battery-emoji

A tiny Go program that outputs your Macbook's battery state as emoji. For your shell prompt.

what it looks like

Installation

Make sure you have Go installed (brew install go), then:

make

It's that easy. Try it out with ./battery-emoji.

To add it to your zsh theme, do something like:

function battery_charge {
    echo `~/dotfiles/batcharge` 2>/dev/null
}

RPROMPT='$(battery_charge)'