mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 18:19:02 +05:30
22 lines
516 B
QML
22 lines
516 B
QML
pragma Singleton
|
|
|
|
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Services.UPower as UPower
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
readonly property string name: {
|
|
switch (UPower.PowerProfiles.profile) {
|
|
case UPower.PowerProfile.Performance:
|
|
return "Performance";
|
|
case UPower.PowerProfile.PowerSaver:
|
|
return "Power Saver";
|
|
default:
|
|
return "Balanced";
|
|
}
|
|
}
|
|
readonly property url icon: `${Quickshell.shellPath("assets")}/icons/power.svg`
|
|
}
|