aboutsummaryrefslogtreecommitdiff
path: root/quickshell/BatteryInfo.qml
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-08-06 00:29:36 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-08-06 00:29:36 +0530
commit91a5f9790cfd4a98ee940633694fb512ecf24942 (patch)
treeb20bdd22e304234b6893e20d0ca5fbfd042f2184 /quickshell/BatteryInfo.qml
parentced774e19c36fb3b0b33a3846e7c9cf874b0c206 (diff)
i3 > hyprland & x11 > wayland
Diffstat (limited to 'quickshell/BatteryInfo.qml')
-rw-r--r--quickshell/BatteryInfo.qml139
1 files changed, 0 insertions, 139 deletions
diff --git a/quickshell/BatteryInfo.qml b/quickshell/BatteryInfo.qml
deleted file mode 100644
index 72e4f3b..0000000
--- a/quickshell/BatteryInfo.qml
+++ /dev/null
@@ -1,139 +0,0 @@
-import QtQuick
-import QtQuick.Layouts
-import Quickshell
-import Quickshell.Io
-
-Rectangle {
- id: batteryInfoRect
-
- width: 300
- height: 120
- Layout.fillWidth: true
- Layout.fillHeight: true
- color: shellRoot.black
- antialiasing: true
- topLeftRadius: 10
- topRightRadius: 10
- property var energy: ""
- property var voltage: ""
- property var capacity: ""
-
- Timer {
- interval: 5000
- running: true
- repeat: false
- onTriggered: {
- fetchProc.running = true;
- }
- }
-
- signal requestClose()
- focus: true
- Keys.onEscapePressed: requestClose()
-
- Process {
- id: fetchProc
- command: ["sh", "-c", "~/.config/quickshell/scripts/battery-info.sh"]
-
- stdout: SplitParser {
- onRead: data => {
- if (data.includes("energy")) {
- energy = data.split(":")[1]
- return
- }
- if (data.includes("voltage")) {
- voltage = data.split(":")[1]
- return
- }
- if (data.includes("capacity")) {
- capacity = data.split(":")[1]
- return
- }
- }
-
- }
- Component.onCompleted: running = true
- }
-
- RowLayout {
- anchors.centerIn: parent
- ColumnLayout {
- anchors.left: parent
- Text {
- text: "Energy"
- font.family: shellRoot.fontFamily
- font.pixelSize: 20
- font.weight: Font.Medium
- color: shellRoot.green
- MouseArea {
- anchors.fill: parent
- onClicked: {
- }
- }
- }
- Text {
- text: "Capacity"
- font.family: shellRoot.fontFamily
- font.pixelSize: 20
- font.weight: Font.Medium
- color: shellRoot.green
- MouseArea {
- anchors.fill: parent
- onClicked: {
- }
- }
- }
- Text {
- text: "Voltage"
- font.family: shellRoot.fontFamily
- font.pixelSize: 20
- font.weight: Font.Medium
- color: shellRoot.green
- MouseArea {
- anchors.fill: parent
- onClicked: {
- }
- }
- }
- }
- ColumnLayout {
- anchors.right: parent
- Text {
- text: energy
- font.family: shellRoot.fontFamily
- font.pixelSize: 20
- font.weight: Font.Medium
- color: shellRoot.white
- MouseArea {
- anchors.fill: parent
- onClicked: {
- }
- }
- }
- Text {
- text: capacity
- font.family: shellRoot.fontFamily
- font.pixelSize: 20
- font.weight: Font.Medium
- color: shellRoot.white
- MouseArea {
- anchors.fill: parent
- onClicked: {
- }
- }
- }
- Text {
- text: voltage
- font.family: shellRoot.fontFamily
- font.pixelSize: 20
- font.weight: Font.Medium
- color: shellRoot.white
- MouseArea {
- anchors.fill: parent
- onClicked: {
- }
- }
- }
- }
- }
-}