Initial commit

This commit is contained in:
kossLAN 2025-06-07 04:01:14 -04:00
commit 05cd51b54e
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
148 changed files with 10112 additions and 0 deletions

View file

@ -0,0 +1,38 @@
import QtQuick
import Quickshell.Widgets
import Quickshell.Services.UPower
import ".."
Item {
property string batteryStatus: {
if (!UPower.onBattery) {
return "charging";
}
let percentage = UPower.displayDevice.percentage * 100;
let roundedValue = Math.floor(percentage / 5) * 5;
return roundedValue.toString();
}
width: 30;
height: parent.height;
visible: UPower.displayDevice.isLaptopBattery;
Rectangle {
color: ShellGlobals.colors.highlight;
width: 12;
height: 8;
visible: batteryStatus === "charging";
anchors {
centerIn: batteryImage;
}
}
IconImage {
id: batteryImage;
implicitSize: 20;
source: Qt.resolvedUrl(`../resources/battery/battery-${batteryStatus}.svg`);
anchors.centerIn: parent;
}
}