#!/bin/bash
# called by sfwbar bat.widget (left-click)


inxi -B -c 0 | grep '[0-9]%' | cut -d ' ' -f 2- | sed -e 's/^[ \t]*//' -e '/^/G' -e 's/Wh (/Wh /g' -e 's/Wh /Wh (/g' -e 's/)/ of design capacity)/g' -e "s/charge/\n• charge/g" -e "s/% condition/% of last full capacity) condition/g" -e "s/condition/\n• condition/g" | Xdialog --fixed-font --title "Battery State" --under-mouse --no-cancel --textbox "-" 8 85 2>/dev/null &
