import Quickshell import Quickshell.Wayland import Quickshell.Io import Quickshell.I3 import QtQuick import QtQuick.Layouts ShellRoot { Dashboard { id: dashboard } Variants { model: Quickshell.screens PanelWindow { property var modelData screen: modelData anchors { top: true left: true right: true } implicitHeight: 30 color: "#1a1b26" margins { top: 0 bottom: 0 left: 0 right: 0 } Rectangle { anchors.fill: parent color: "#1a1b26" RowLayout { anchors.fill: parent spacing: 0 Item { width: 8 } Rectangle { Layout.preferredWidth: 24 Layout.preferredHeight: 24 color: "transparent" Image { anchors.fill: parent source: "file:///home/tony/.config/quickshell/icons/tonybtw.png" fillMode: Image.PreserveAspectFit } } Item { width: 8 } Repeater { model: 9 Rectangle { Layout.preferredWidth: 30 Layout.preferredHeight: parent.height color: "transparent" property var workspace: { for (var i = 0; i < I3.workspaces.values.length; i++) { var ws = I3.workspaces.values[i]; if (ws.num === (index + 1)) { return ws; } } return null; } property bool isActive: workspace ? workspace.active : false property bool hasWindows: workspace !== null Column { anchors.centerIn: parent spacing: 0 Text { text: index + 1 color: parent.parent.isActive ? "#0db9d7" : (parent.parent.hasWindows ? "#0db9d7" : "#444b6a") font.pixelSize: 16 font.family: "JetBrainsMono Nerd Font" font.bold: true horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter } Rectangle { width: 20 height: 3 color: parent.parent.isActive ? "#ad8ee6" : "#1a1b26" anchors.horizontalCenter: parent.horizontalCenter } } MouseArea { anchors.fill: parent onClicked: { I3.dispatch("workspace number " + (index + 1)); } } } } Rectangle { Layout.preferredWidth: 1 Layout.preferredHeight: 16 Layout.alignment: Qt.AlignVCenter Layout.leftMargin: 8 Layout.rightMargin: 8 color: "#444b6a" } Text { text: "Tile" color: "#a9b1d6" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.leftMargin: 5 Layout.rightMargin: 5 } Rectangle { Layout.preferredWidth: 1 Layout.preferredHeight: 16 Layout.alignment: Qt.AlignVCenter Layout.leftMargin: 2 Layout.rightMargin: 8 color: "#444b6a" } Text { text: "Window" color: "#ad8ee6" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.fillWidth: true Layout.leftMargin: 8 elide: Text.ElideRight maximumLineCount: 1 } Text { text: "Linux" color: "#e0af68" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.rightMargin: 8 } Rectangle { Layout.preferredWidth: 1 Layout.preferredHeight: 16 Layout.alignment: Qt.AlignVCenter Layout.leftMargin: 0 Layout.rightMargin: 8 color: "#444b6a" } Text { text: "CPU: --" color: "#e0af68" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.rightMargin: 8 } Rectangle { Layout.preferredWidth: 1 Layout.preferredHeight: 16 Layout.alignment: Qt.AlignVCenter Layout.leftMargin: 0 Layout.rightMargin: 8 color: "#444b6a" } Text { text: "Mem: --" color: "#0db9d7" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.rightMargin: 8 } Rectangle { Layout.preferredWidth: 1 Layout.preferredHeight: 16 Layout.alignment: Qt.AlignVCenter Layout.leftMargin: 0 Layout.rightMargin: 8 color: "#444b6a" } Text { text: "Disk: --" color: "#7aa2f7" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.rightMargin: 8 } Rectangle { Layout.preferredWidth: 1 Layout.preferredHeight: 16 Layout.alignment: Qt.AlignVCenter Layout.leftMargin: 0 Layout.rightMargin: 8 color: "#444b6a" } Text { text: "Vol: --" color: "#ad8ee6" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.rightMargin: 8 } Rectangle { Layout.preferredWidth: 1 Layout.preferredHeight: 16 Layout.alignment: Qt.AlignVCenter Layout.leftMargin: 0 Layout.rightMargin: 8 color: "#444b6a" } Text { id: clockText text: Qt.formatDateTime(new Date(), "ddd, MMM dd - HH:mm") color: "#0db9d7" font.pixelSize: 14 font.family: "JetBrainsMono Nerd Font" font.bold: true Layout.rightMargin: 8 Timer { interval: 1000 running: true repeat: true onTriggered: clockText.text = Qt.formatDateTime(new Date(), "ddd, MMM dd - HH:mm") } } Item { width: 8 } } } } } }