Files
Aurora/config/aurora/modules/Battery.qml
2026-04-09 11:16:48 -05:00

35 lines
724 B
QML

import Quickshell // for PanelWindow
import QtQuick // for Text
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell.Io
import Quickshell.Widgets
import Quickshell.Hyprland
import Quickshell.Services.UPower
ClippingWrapperRectangle {
radius: 3
color: Settings.colors.color2
implicitWidth: 30
implicitHeight: text.contentWidth + text.padding
Text {
id: text
text: (UPower.onBattery ? "" : "󱐋") + Math.round(UPower.displayDevice.percentage * 100) + "%"
padding: 10
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pointSize: 14
color: Settings.special.foreground
rotation: -90
}
}