diff options
Diffstat (limited to '.config/quickshell/Battery.qml')
| -rw-r--r-- | .config/quickshell/Battery.qml | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/.config/quickshell/Battery.qml b/.config/quickshell/Battery.qml deleted file mode 100644 index 0d6213c..0000000 --- a/.config/quickshell/Battery.qml +++ /dev/null @@ -1,33 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Io -import QtQuick - -Singleton { - id: root - property string status: "Discharging" - property int capacity: 0 - - FileView { - id: statusFile - path: "/sys/class/power_supply/BAT0/status" - onLoaded: root.status = this.text().trim() - } - - FileView { - id: capacityFile - path: "/sys/class/power_supply/BAT0/capacity" - onLoaded: root.capacity = parseInt(this.text().trim()) - } - - Timer { - interval: 10000 - running: true - repeat: true - onTriggered: { - statusFile.reload() - capacityFile.reload() - } - } -} |
