(defwidget battery []
  (circular-progress :class "battery-scale"
                     :value {EWW_BATTERY["BAT0"].capacity}
                     :start-at 75
                     :thickness 2.5
                     :clockwise true
                     (box :orientation "v"
                        (box :class "hardware"
                          (image
                            :image-width 16
                            :path {matches(EWW_BATTERY["BAT0"].status, "Full")? bat_full_icon : matches(EWW_BATTERY["BAT0"].status, "Charging") ? bat_charging_icon : bat_icon})))))

(defvar bat_full_icon "widgets/hardware_stats/battery/full-icon.png")
(defvar bat_charging_icon "widgets/hardware_stats/battery/charging-icon.png")
(defvar bat_icon "widgets/hardware_stats/battery/battery-icon.png")
