This reverts commit 32ab0fb22f.
This commit is contained in:
Sakooooo 2025-01-10 09:26:56 +04:00
parent 32ab0fb22f
commit 52b67ecda9
Signed by: sako
GPG key ID: 3FD715D87D7725E0
2 changed files with 31 additions and 57 deletions

View file

@ -3,10 +3,8 @@ import QtQuick.Layouts
import Quickshell import Quickshell
import Quickshell.Hyprland import Quickshell.Hyprland
RowLayout { ListView {
id: workspaceList id: workspaceList
height: 30
spacing: 0
property var workspaceArray: Array.from({ length: 10}, (_, i) => ({ property var workspaceArray: Array.from({ length: 10}, (_, i) => ({
id: i + 1, id: i + 1,
text: i + 1, text: i + 1,
@ -14,49 +12,23 @@ RowLayout {
active: Hyprland.focusedMonitor.activeWorkspace.id === i + 1 active: Hyprland.focusedMonitor.activeWorkspace.id === i + 1
})) }))
Repeater {
model: workspaceArray model: workspaceArray
delegate: Rectangle { anchors.top: parent.top
id: workspace anchors.centerIn: parent
width: 20 height: 500
height: parent.height width: 60
color: (modelData.active) ? "#222222" : (modelData.visible) ? "#444444" : "#000000" spacing: 2
Text { delegate: Item {
color: "#FFFFFF" 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 anchors.centerIn: parent
text: modelData.text
} }
} }
}
} }
/* 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 */
/* } */
/* } */
/* } */

View file

@ -25,24 +25,26 @@ ShellRoot {
})) }))
/* width: 70 */ width: 70
color: "#222222" color: "#222222"
screen: modelData screen: modelData
anchors { anchors {
/* top: true; */ top: true;
bottom: true; bottom: true;
left: true; left: true;
right: true; /* right: true; */
} }
height: 30; height: 30;
// left // left
RowLayout { RowLayout {
anchors.left: parent.left /* anchors.left: parent.left */
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom /* anchors.bottom: parent.bottom */
anchors.topMargin: 5;
spacing: 5
Workspaces {} Workspaces {}
@ -54,18 +56,18 @@ ShellRoot {
// Center // Center
RowLayout { RowLayout {
anchors.centerIn: parent anchors.centerIn: parent
Text { /* Text { */
color: "#FFFFFF" /* color: "#FFFFFF" */
// now just time instead of root.time /* // now just time instead of root.time */
text: time /* text: time */
} /* } */
} }
// right // right
RowLayout { RowLayout {
anchors.right: parent.right /* anchors.right: parent.right */
anchors.top: parent.top /* anchors.top: parent.top */
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
spacing: 5 spacing: 5