More tweaks
This commit is contained in:
@@ -601,8 +601,8 @@ Item {
|
|||||||
if (dev.batteryAvailable) return "Connected · " + Math.round(dev.battery * 100) + "%"
|
if (dev.batteryAvailable) return "Connected · " + Math.round(dev.battery * 100) + "%"
|
||||||
return "Connected"
|
return "Connected"
|
||||||
}
|
}
|
||||||
if (isDiscovered) return "Available · click to pair"
|
if (isDiscovered) return ""
|
||||||
return "Paired"
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property color statusColor: {
|
readonly property color statusColor: {
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readonly property bool fullyCharged: {
|
||||||
|
var device = UPower.displayDevice
|
||||||
|
return device && device.isPresent && device.state === UPowerDeviceState.FullyCharged
|
||||||
|
}
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
if (!batteryProc.running) batteryProc.running = true
|
if (!batteryProc.running) batteryProc.running = true
|
||||||
if (!profilesProc.running) profilesProc.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 {
|
Row {
|
||||||
visible: root.batteryInfo.percentage !== undefined
|
visible: root.batteryInfo.percentage !== undefined && !root.fullyCharged
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
spacing: 24
|
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 {
|
Column {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: 12
|
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 {
|
Row {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: 6
|
spacing: 6
|
||||||
|
|||||||
Reference in New Issue
Block a user