diff options
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 } + } + } +} |
