diff options
| author | Sam Nystrom <sam@samnystrom.dev> | 2026-01-16 11:04:25 -0500 |
|---|---|---|
| committer | Sam Nystrom <sam@samnystrom.dev> | 2026-01-16 11:06:33 -0500 |
| commit | 3d300067f6e179e03d1983159b81e1c2cfe2fa8c (patch) | |
| tree | 46981a14c530b6a1e897300372cefe83e0f491fe /.config/quickshell/Modules/BarStatus.qml | |
| parent | edf72cc5f6f005251ef77d585bdf800891866d8a (diff) | |
refactor qs bar
Diffstat (limited to '.config/quickshell/Modules/BarStatus.qml')
| -rw-r--r-- | .config/quickshell/Modules/BarStatus.qml | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/.config/quickshell/Modules/BarStatus.qml b/.config/quickshell/Modules/BarStatus.qml new file mode 100644 index 0000000..436392a --- /dev/null +++ b/.config/quickshell/Modules/BarStatus.qml @@ -0,0 +1,82 @@ +import Quickshell +import QtQuick +import QtQuick.Layouts +import qs.Services + +Rectangle { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + implicitWidth: status.implicitWidth + 12*2 + height: parent.height + color: Flexoki.bg + radius: 18 + + RowLayout { + id: status + anchors.centerIn: parent + implicitHeight: parent.implicitHeight + spacing: 24 + + Text { + text: { + // + var icon + if (Volume.volume == 0) { + icon = " " + } else if (Volume.volume < 50) { + icon = " " + } else { + icon = " " + } + return icon + Volume.volume + "%" + } + color: Flexoki.re + font { family: root.fontFamily; pixelSize: root.fontSize } + } + + Text { + text: Wifi.ssid == "" ? " " : " " + Wifi.ssid + color: Flexoki.or + font { family: root.fontFamily; pixelSize: root.fontSize } + } + + Text { + text: " " + Brightness.brightness + "%" + color: Flexoki.ye + font { family: root.fontFamily; pixelSize: root.fontSize } + } + + Text { + text: { + var icon + var i = Math.floor((Battery.capacity - 1) / 10) + switch (Battery.status) { + case "Full": + icon = "" + break + case "Discharging": + icon = ["","","","","","","","","",""][i] + break + case "Charging": + icon = ["","","","","","","","","",""][i] + break + } + return icon + " " + Battery.capacity + "%" + } + color: Flexoki.gr + font { family: root.fontFamily; pixelSize: root.fontSize } + } + + Text { + text: " " + Qt.formatDateTime(Time.time, "MMM d hh:mm:ss") + color: Flexoki.bl + font { family: root.fontFamily; pixelSize: root.fontSize } + } + + Text { + text: "" + color: Flexoki.pu + font { family: root.fontFamily; pixelSize: root.fontSize * 1.5 } + } + } +} |
