add low battery toast, unload if not laptop battery.
This commit is contained in:
@@ -214,6 +214,10 @@ Singleton {
|
||||
},
|
||||
idle: {
|
||||
timeouts: general.idle.timeouts
|
||||
},
|
||||
battery: {
|
||||
popupThresholds: general.battery.popupThresholds,
|
||||
critPerc: general.battery.critPerc
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import Quickshell
|
||||
JsonObject {
|
||||
property Apps apps: Apps {
|
||||
}
|
||||
property Battery battery: Battery {
|
||||
}
|
||||
property Color color: Color {
|
||||
}
|
||||
property string dateFormat: "ddd d MMM - hh:mm:ss"
|
||||
@@ -19,6 +21,17 @@ JsonObject {
|
||||
property list<string> playback: ["mpv"]
|
||||
property list<string> terminal: ["kitty"]
|
||||
}
|
||||
component Battery: JsonObject {
|
||||
property int critPerc: 5
|
||||
property list<var> popupThresholds: [
|
||||
{
|
||||
perc: 20,
|
||||
name: qsTr("Low battery"),
|
||||
message: qsTr("Battery at %1%").arg(Battery.currentPerc * 100),
|
||||
icon: "battery_android_frame_2"
|
||||
},
|
||||
]
|
||||
}
|
||||
component Color: JsonObject {
|
||||
property int hyprsunsetTemp: 5000
|
||||
property string mode: "dark"
|
||||
|
||||
Reference in New Issue
Block a user