#!/bin/sh set -e awk ' { printf "percentage=%d%%\n", $0 printf "icon=" if ($1 == "Charging") print "󰂄" else if ($0 >= 90) print "󰁹" else if ($0 >= 80) print "󰂂" else if ($0 >= 70) print "󰂁" else if ($0 >= 60) print "󰁿" else if ($0 >= 50) print "󰁾" else if ($0 >= 40) print "󰁽" else if ($0 >= 30) print "󰁼" else if ($0 >= 20) print "󰁻" else if ($0 >= 10) print "󰁺" else print "󰂎" }' /sys/class/power_supply/BAT1/capacity \ | jo