More tweaks

This commit is contained in:
David Heinemeier Hansson
2026-05-18 22:47:06 +02:00
parent 1a457118a5
commit bc1b824891
2 changed files with 18 additions and 5 deletions
+2 -2
View File
@@ -601,8 +601,8 @@ Item {
if (dev.batteryAvailable) return "Connected · " + Math.round(dev.battery * 100) + "%"
return "Connected"
}
if (isDiscovered) return "Available · click to pair"
return "Paired"
if (isDiscovered) return ""
return ""
}
readonly property color statusColor: {
+16 -3
View File
@@ -46,6 +46,11 @@ Item {
}
}
readonly property bool fullyCharged: {
var device = UPower.displayDevice
return device && device.isPresent && device.state === UPowerDeviceState.FullyCharged
}
function refresh() {
if (!batteryProc.running) batteryProc.running = true
if (!profilesProc.running) profilesProc.running = true
@@ -193,7 +198,7 @@ printf 'time\t%s\n' "$($OMARCHY_PATH/bin/omarchy-battery-remaining-time 2>/dev/n
}
Row {
visible: root.batteryInfo.percentage !== undefined
visible: root.batteryInfo.percentage !== undefined && !root.fullyCharged
anchors.horizontalCenter: parent.horizontalCenter
spacing: 24
@@ -212,12 +217,20 @@ printf 'time\t%s\n' "$($OMARCHY_PATH/bin/omarchy-battery-remaining-time 2>/dev/n
}
}
PanelSeparator { foreground: root.bar.foreground }
PanelSeparator {
visible: !root.fullyCharged
foreground: root.bar.foreground
}
Column {
width: parent.width
spacing: 12
PanelSectionHeader { text: "POWER PROFILE"; foreground: root.bar.foreground; fontFamily: root.bar.fontFamily }
PanelSectionHeader {
visible: !root.fullyCharged
text: "POWER PROFILE"
foreground: root.bar.foreground
fontFamily: root.bar.fontFamily
}
Row {
width: parent.width
spacing: 6