mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-22 01:22:44 +00:00
feat: update system
This commit is contained in:
@@ -4,15 +4,11 @@ import Battery from "resource:///com/github/Aylur/ags/service/battery.js";
|
||||
export default () =>
|
||||
Widget.Icon({
|
||||
class_name: "battery",
|
||||
binds: [["icon", Battery, "icon-name"]],
|
||||
connections: [
|
||||
[
|
||||
Battery,
|
||||
(icon) => {
|
||||
icon.toggleClassName("charging", Battery.charging);
|
||||
icon.toggleClassName("charged", Battery.charged);
|
||||
icon.toggleClassName("low", Battery.percent < 30);
|
||||
},
|
||||
],
|
||||
],
|
||||
icon: Battery.bind("icon_name"),
|
||||
setup: (icon) =>
|
||||
icon.hook(Battery, () => {
|
||||
icon.toggleClassName("charging", Battery.charging);
|
||||
icon.toggleClassName("charged", Battery.charged);
|
||||
icon.toggleClassName("low", Battery.percent < 30);
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user