From 52b67ecda9d3ef7662c8d9cc981479d576c25e9d Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Fri, 10 Jan 2025 09:26:56 +0400 Subject: [PATCH] nvm This reverts commit 32ab0fb22fe9b9ae5af9e551c837b0c4e0e6e037. --- config/quickshell/Workspaces.qml | 62 +++++++++----------------------- config/quickshell/shell.qml | 26 +++++++------- 2 files changed, 31 insertions(+), 57 deletions(-) diff --git a/config/quickshell/Workspaces.qml b/config/quickshell/Workspaces.qml index 6d393d2d..e2552254 100644 --- a/config/quickshell/Workspaces.qml +++ b/config/quickshell/Workspaces.qml @@ -3,10 +3,8 @@ import QtQuick.Layouts import Quickshell import Quickshell.Hyprland -RowLayout { +ListView { id: workspaceList - height: 30 - spacing: 0 property var workspaceArray: Array.from({ length: 10}, (_, i) => ({ id: i + 1, text: i + 1, @@ -14,49 +12,23 @@ RowLayout { active: Hyprland.focusedMonitor.activeWorkspace.id === i + 1 })) - Repeater { - model: workspaceArray - delegate: Rectangle { + model: workspaceArray + anchors.top: parent.top + anchors.centerIn: parent + height: 500 + width: 60 + spacing: 2 + delegate: Item { + width: Math.max((modelData.active) ? 50 : 40, 50) + height: 10 + Rectangle { id: workspace - width: 20 - height: parent.height - color: (modelData.active) ? "#222222" : (modelData.visible) ? "#444444" : "#000000" - Text { - color: "#FFFFFF" - anchors.centerIn: parent - text: modelData.text - } + width: (modelData.active) ? 50 : 40 + height: 10 + radius: height / 2 + border.width: 1 + border.color: (modelData.active) ? "#FFF8C8DC" : (modelData.visible) ? "#3399FF" : "#FFFFFF" + anchors.centerIn: parent } } - } - -/* ListView { */ -/* id: workspaceList */ -/* property var workspaceArray: Array.from({ length: 10}, (_, i) => ({ */ -/* id: i + 1, */ -/* text: i + 1, */ -/* visible: Hyprland.workspaces.values.some(e => e.id === i + 1), */ -/* active: Hyprland.focusedMonitor.activeWorkspace.id === i + 1 */ -/* })) */ - -/* model: workspaceArray */ -/* anchors.top: parent.top */ -/* anchors.centerIn: parent */ -/* height: parent.height */ -/* width: 60 */ -/* spacing: 2 */ -/* delegate: Item { */ -/* width: Math.max((modelData.active) ? 50 : 40, 50) */ -/* height: 10 */ -/* Rectangle { */ -/* id: workspace */ -/* width: (modelData.active) ? 50 : 40 */ -/* height: 10 */ -/* radius: height / 2 */ -/* border.width: 1 */ -/* border.color: (modelData.active) ? "#FFF8C8DC" : (modelData.visible) ? "#3399FF" : "#FFFFFF" */ -/* anchors.centerIn: parent */ -/* } */ -/* } */ -/* } */ diff --git a/config/quickshell/shell.qml b/config/quickshell/shell.qml index fca1a349..e692a312 100644 --- a/config/quickshell/shell.qml +++ b/config/quickshell/shell.qml @@ -25,24 +25,26 @@ ShellRoot { })) - /* width: 70 */ + width: 70 color: "#222222" screen: modelData anchors { - /* top: true; */ + top: true; bottom: true; left: true; - right: true; + /* right: true; */ } height: 30; // left RowLayout { - anchors.left: parent.left + /* anchors.left: parent.left */ anchors.top: parent.top - anchors.bottom: parent.bottom + /* anchors.bottom: parent.bottom */ + anchors.topMargin: 5; + spacing: 5 Workspaces {} @@ -54,18 +56,18 @@ ShellRoot { // Center RowLayout { anchors.centerIn: parent - Text { - color: "#FFFFFF" - // now just time instead of root.time - text: time - } + /* Text { */ + /* color: "#FFFFFF" */ + /* // now just time instead of root.time */ + /* text: time */ + /* } */ } // right RowLayout { - anchors.right: parent.right - anchors.top: parent.top + /* anchors.right: parent.right */ + /* anchors.top: parent.top */ anchors.bottom: parent.bottom spacing: 5