summaryrefslogtreecommitdiff
path: root/widget/Battery.tsx
blob: d1b70d64a5247c144cab0f438d90b82a0994a21b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import Battery from "gi://AstalBattery"
import { bind } from "astal"

export default function BatteryPercentage() {
  const bat = Battery.get_default()

  return <box>
    <button onClick="echo hello" />
    <label label="hi" />
    <label label={bind(bat, "percentage").as((p) => p * 100 + "%")} />
  </box>
}