Open Madcliff opened 1 month ago
I'll probably add that feature later
Thanks it would be very useful.
So, I noticed that PPD has an AGS plugin, so I wrote the following and inserted it into bar.ts
const powerProfiles = await Service.import('powerprofiles')
function PowerProfileButton() {
return Widget.Button({
class_name: "clock",
child: Widget.Box({
orientation: Gtk.Orientation.VERTICAL,
children: [
Widget.Label({
class_name: "active_profile",
label: powerProfiles.bind('active_profile'),
})
]
}),
on_clicked: () => {
switch (powerProfiles.active_profile) {
case 'balanced':
powerProfiles.active_profile = 'performance';
break;
case 'performance':
powerProfiles.active_profile = 'power-saver';
break;
default:
powerProfiles.active_profile = 'balanced';
break;
};
},
});
}
Might it be possible to get a power management widget to simplify changing the current power governor?
Would be nice to have an easy UI option for putting my laptop into battery saver mode.