#!/bin/sh case $(hostname -s) in mother) return ;; po-rbo) charge=$(cat /sys/class/power_supply/BAT0/capacity) [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ] && printf "󱐋 " [ "$(cat /sys/class/power_supply/BAT0/status)" = "Not charging" ] && printf "󱐋 " ;; mars) charge=$(apm -l) [ "$(apm -b)" -eq 3 ] && printf "󱐋 " ;; esac case $(echo "$charge" / 20 | bc) in "0") printf " " ;; "1") printf " " ;; "2") printf " " ;; "3") printf " " ;; "4") [ "$charge" -gt 94 ] && return printf " " ;; "5") printf "󱐋 " ;; esac