diff options
Diffstat (limited to 'quickshell/items')
| -rw-r--r-- | quickshell/items/DataBus.qml | 23 | ||||
| -rw-r--r-- | quickshell/items/Electrons.qml | 23 | ||||
| -rw-r--r-- | quickshell/items/Latch.qml | 23 | ||||
| -rw-r--r-- | quickshell/items/Photons.qml | 32 | ||||
| -rw-r--r-- | quickshell/items/Radiation.qml | 23 | ||||
| -rw-r--r-- | quickshell/items/Radio.qml | 28 | ||||
| -rw-r--r-- | quickshell/items/Spin.qml | 45 | ||||
| -rw-r--r-- | quickshell/items/Waves.qml | 23 | ||||
| -rw-r--r-- | quickshell/items/Workspace.qml | 22 |
9 files changed, 242 insertions, 0 deletions
diff --git a/quickshell/items/DataBus.qml b/quickshell/items/DataBus.qml new file mode 100644 index 0000000..ef9f952 --- /dev/null +++ b/quickshell/items/DataBus.qml @@ -0,0 +1,23 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Data Bus:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + text: cpuUsage + color: shellRoot.orange + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + } +} diff --git a/quickshell/items/Electrons.qml b/quickshell/items/Electrons.qml new file mode 100644 index 0000000..f3164a0 --- /dev/null +++ b/quickshell/items/Electrons.qml @@ -0,0 +1,23 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Electrons:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + text: battery + color: (battery <= redBatteryPoint) ? shellRoot.red : ((battery <= orangeBatteryPoint) ? shellRoot.orange : shellRoot.green) + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + } +} diff --git a/quickshell/items/Latch.qml b/quickshell/items/Latch.qml new file mode 100644 index 0000000..5cc6487 --- /dev/null +++ b/quickshell/items/Latch.qml @@ -0,0 +1,23 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Latch:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + text: memUsage + color: shellRoot.orange + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + } +} diff --git a/quickshell/items/Photons.qml b/quickshell/items/Photons.qml new file mode 100644 index 0000000..0ba94ee --- /dev/null +++ b/quickshell/items/Photons.qml @@ -0,0 +1,32 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Photons:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + text: brightness + color: shellRoot.orange + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + } + Text { + text: "(" + temperature + "K)" + color: shellRoot.red + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + } +} diff --git a/quickshell/items/Radiation.qml b/quickshell/items/Radiation.qml new file mode 100644 index 0000000..e2a6c09 --- /dev/null +++ b/quickshell/items/Radiation.qml @@ -0,0 +1,23 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Radiation:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + text: cpu_temperature + "K" + color: shellRoot.orange + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + } +} diff --git a/quickshell/items/Radio.qml b/quickshell/items/Radio.qml new file mode 100644 index 0000000..b3ee8e6 --- /dev/null +++ b/quickshell/items/Radio.qml @@ -0,0 +1,28 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Radio:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + text: wifiName + color: wifiName == "Offline" ? shellRoot.red : shellRoot.green + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + + MouseArea { + anchors.fill: parent + onClicked: networkManagerProc.running = true + } + } +} diff --git a/quickshell/items/Spin.qml b/quickshell/items/Spin.qml new file mode 100644 index 0000000..72e6105 --- /dev/null +++ b/quickshell/items/Spin.qml @@ -0,0 +1,45 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Spin:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + property var formatMode: "HH:mm:ss" + + id: clock + text: Qt.formatDateTime(new Date(), clock.formatMode) + color: shellRoot.purple + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + + Timer { + interval: 1000 + running: true + repeat: true + onTriggered: clock.text = Qt.formatDateTime(new Date(), clock.formatMode) + } + + MouseArea { + anchors.fill: parent + onClicked: { + if (clock.formatMode === "HH:mm:ss") { + clock.formatMode = "yyyy/MM/dd, dddd" + } else { + clock.formatMode = "HH:mm:ss" + } + clock.text = Qt.formatDateTime(new Date(), clock.formatMode) + } + } + } +} diff --git a/quickshell/items/Waves.qml b/quickshell/items/Waves.qml new file mode 100644 index 0000000..05e42e2 --- /dev/null +++ b/quickshell/items/Waves.qml @@ -0,0 +1,23 @@ +import QtQuick +import QtQuick.Layouts + +RowLayout { + spacing: 0 + Text { + text: " Waves:" + color: shellRoot.white + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + } + } + Text { + text: volume + color: shellRoot.green + font { + family: shellRoot.fontFamily + pixelSize: shellRoot.fontSize + bold: true + } + } +} diff --git a/quickshell/items/Workspace.qml b/quickshell/items/Workspace.qml new file mode 100644 index 0000000..f793850 --- /dev/null +++ b/quickshell/items/Workspace.qml @@ -0,0 +1,22 @@ +import QtQuick +import Quickshell.Hyprland + +Repeater { + model: 5 + + Text { + property bool isActive: Hyprland.focusedWorkspace?.id === (index + 1) + + text: index + 1 + color: isActive ? shellRoot.green : shellRoot.white + font { + pixelSize: shellRoot.fontSize; + bold: true; + } + + MouseArea { + anchors.fill: parent + onClicked: Hyprland.dispatch("workspace " + (index + 1)) + } + } +} |
