Krolyxon
Commit a466635

Branches

Refs →

auroraa466635

aurora: drop the 80% charge mode, conservation already caps at 80%

Author
krolyxon
Date
2026-10-25 16:25 +0530
Parent
a0ac8b4
Commit
a466635677ddd8f4ea7ea7787eaa90e8112ac7bb

+15 −25

4 files changed

  1. M .config/quickshell/aurora/Battery.qml +7 −13
  2. M .config/quickshell/aurora/BatteryInfo.qml +1 −2
  3. M .config/quickshell/aurora/SetPower.qml +6 −9
  4. M .config/quickshell/aurora/Settings.qml +1 −1
M .config/quickshell/aurora/Battery.qml View
@@ -9,9 +9,8 @@ import Quickshell.Services.UPower
99 // switches it without sudo (EnableChargeThreshold, polkit allow_active) but Quickshell's UPower doesn't
1010 // expose that, hence busctl. Settings.chargeMode:
1111 // off normal charging
12−// conservation firmware cap on all the time (kept by the EC, works without aurora)
13−// limit80 aurora turns the cap on at 80% while plugged in (charging stops and the charge is held),
14−// and off again below 75% or when unplugged. Only while aurora runs.
12+// conservation firmware cap on all the time (stops at ~80%, kept by the EC, works without aurora)
13+// (anything else that isn't "off", like the old "limit80", counts as conservation)
1514 Singleton {
1615 id: root
1716
@@ -41,20 +40,15 @@ Singleton {
4140 setProc.command = busctl(["call", "EnableChargeThreshold", "b", on ? "true" : "false"])
4241 setProc.running = true
4342 }
44− // what the cap should be for the current mode / charge / power source
43+ // keep the firmware cap in line with the setting
4544 function evaluate() {
46− if (!started || !ready || !supported || !hasBat || pct <= 0) return
47− var mode = Settings.chargeMode, want = capOn
48− if (mode === "conservation") want = true
49− else if (mode === "limit80") {
50− if (!onAc || pct < 75) want = false // unplugged: replugging under 80% charges again
51− else if (pct >= 80) want = true
52− } else want = false
45+ if (!started || !ready || !supported || !hasBat) return
46+ var want = Settings.chargeMode !== "off"
5347 if (want !== capOn) setCap(want)
5448 }
5549
56− onPctChanged: { evaluate(); checkLow() }
57− onOnAcChanged: { evaluate(); checkLow() }
50+ onPctChanged: checkLow()
51+ onOnAcChanged: checkLow()
5852 Connections {
5953 target: Settings
6054 function onChargeModeChanged() { root.evaluate() }
M .config/quickshell/aurora/BatteryInfo.qml View
@@ -43,8 +43,7 @@ ColumnLayout {
4343 if (root.bat.changeRate !== undefined)
4444 lines.push("power draw " + Math.abs(root.bat.changeRate).toFixed(1) + " W")
4545 if (Settings.chargeMode !== "off" && Battery.supported)
46− lines.push("charge limit " + (Settings.chargeMode === "limit80" ? "80%" : "conservation")
47− + (Battery.held ? ", holding" : ""))
46+ lines.push("charge limit conservation" + (Battery.held ? ", holding" : ""))
4847 if (root.bat.healthSupported)
4948 lines.push("health " + Math.round(root.bat.healthPercentage) + "%")
5049 return lines.join("\n")
M .config/quickshell/aurora/SetPower.qml View
@@ -62,21 +62,18 @@ Flickable {
6262 Choice {
6363 visible: Battery.supported
6464 label: "charge limit"
65− options: [{ value: "off", label: "off" }, { value: "limit80", label: "80%" },
66− { value: "conservation", label: "conservation" }]
67− value: Settings.chargeMode
65+ options: [{ value: "off", label: "off" }, { value: "conservation", label: "conservation" }]
66+ value: Settings.chargeMode === "off" ? "off" : "conservation"
6867 onPicked: v => Settings.chargeMode = v
6968 }
7069 Text {
7170 visible: Battery.supported
7271 Layout.fillWidth: true
7372 wrapMode: Text.WordWrap
74− text: Settings.chargeMode === "limit80"
75− ? "aurora stops charging at 80% (conservation mode on) and resumes below 75%. Only while aurora runs."
76− : Settings.chargeMode === "conservation"
77− ? "the firmware's fixed cap, kept even when aurora isn't running. Conservation mode is "
78− + (Battery.capOn ? "on" : "off") + "."
79− : "charges to 100%"
73+ text: Settings.chargeMode !== "off"
74+ ? "the firmware stops charging at ~80%, even when aurora isn't running. Conservation mode is "
75+ + (Battery.capOn ? "on" : "off") + "."
76+ : "charges to 100%"
8077 color: Theme.dim
8178 font.family: Theme.font
8279 font.pixelSize: Theme.fontSize - 2
M .config/quickshell/aurora/Settings.qml View
@@ -91,7 +91,7 @@ Singleton {
9191 property int idleSuspend: 0
9292 property int charTone: 0 // glyph picker emoji skin tone, 0 = none, 1-5 light..dark
9393 property bool portalAutoOpen: true // open captive portal login pages in $BROWSER (Net.qml)
94− property string chargeMode: "off" // off | conservation | limit80 (Battery.qml)
94+ property string chargeMode: "off" // off | conservation (Battery.qml)
9595 property int batLow: 15 // low battery warning, %
9696 property int batCritical: 5
9797 property string batCriticalAction: "none" // none | suspend | poweroff