feat: split scss and rename widget folder to widgets

This commit is contained in:
tux
2025-06-09 00:41:04 +05:30
parent 9712b9e0ea
commit 72f9c24482
14 changed files with 123 additions and 119 deletions

14
widgets/bar/battery.tsx Normal file
View File

@@ -0,0 +1,14 @@
import { bind } from "astal";
import AstalBattery from "gi://AstalBattery";
export const Battery = () => {
const battery = AstalBattery.get_default();
return (
<box cssClasses={["battery"]} visible={bind(battery, "isPresent")}>
<label
label={bind(battery, "percentage").as((p) => `${Math.floor(p * 100)}%`)}
/>
</box>
);
};