#!/bin/bash

get_icon() {
    bash ~/.config/eww/scripts/battery --icon
}

# Output initial state
get_icon

# Monitor battery events using upower
upower --monitor | while read -r line; do
    get_icon
done
