mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-22 17:42:43 +00:00
feat: update system
This commit is contained in:
@@ -13,23 +13,16 @@ const SysProgress = (type, title, unit) =>
|
||||
Widget.Box({
|
||||
class_name: `circular-progress-box ${type}`,
|
||||
hexpand: true,
|
||||
binds: [
|
||||
[
|
||||
"tooltipText",
|
||||
vars[type],
|
||||
"value",
|
||||
(v) => `${title}: ${Math.floor(v * 100)}${unit}`,
|
||||
],
|
||||
],
|
||||
tooltip_text: vars[type]
|
||||
.bind("value")
|
||||
.transform((v) => `${title}: ${Math.floor(v * 100)}${unit}`),
|
||||
child: Widget.CircularProgress({
|
||||
hexpand: true,
|
||||
class_name: `circular-progress ${type}`,
|
||||
child: Widget.Icon(icons.system[type]),
|
||||
start_at: 0.75,
|
||||
binds: [
|
||||
["value", vars[type]],
|
||||
["rounded", options.radii, "value", (v) => v > 0],
|
||||
],
|
||||
value: vars[type].bind(),
|
||||
rounded: options.radii.bind("value").transform((v) => v > 0),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -45,7 +38,7 @@ export default () =>
|
||||
Clock({ format: "%H:%M" }),
|
||||
Widget.Label({
|
||||
class_name: "uptime",
|
||||
binds: [["label", vars.uptime, "value", (t) => `uptime: ${t}`]],
|
||||
label: vars.uptime.bind("value").transform((t) => `uptime: ${t}`),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user