35 lines
718 B
QML
35 lines
718 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: Pywal.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: Pywal.special.foreground
|
|
rotation: -90
|
|
}
|
|
}
|