move to workspaces to subfolder

This commit is contained in:
Benjamin Palko 2025-07-22 09:14:39 -04:00
parent 00a46ac6ec
commit a64381ec92
3 changed files with 4 additions and 3 deletions

View file

@ -0,0 +1,89 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
import Quickshell.Hyprland
import "../../../../config"
import "../../../../styled/"
Item {
id: workspace
required property HyprlandWorkspace modelData
visible: modelData.id > 0
width: Dimensions.workspace.width
height: Dimensions.workspace.height
Rectangle {
id: rectangle
anchors.fill: parent
color: Theme.palette.base100
radius: Dimensions.radius
states: State {
name: "hovered"
when: mouseArea.containsMouse
PropertyChanges {
rectangle {
color: Theme.palette.primary
}
}
}
transitions: Transition {
from: ""
to: "hovered"
reversible: true
ColorAnimation {
properties: "color"
duration: 200
easing.type: Easing.InOutCubic
}
}
}
Icon {
id: icon
source: "/home/baobeld/dotfiles/quickshell/assets/triangle.svg"
anchors.centerIn: parent
size: Dimensions.workspace.iconSize
states: State {
name: "active"
when: workspace.modelData.active
PropertyChanges {
icon {
rotation: 180
color: mouseArea.containsMouse ? Theme.palette.basecontent : Theme.palette.primary
}
}
}
transitions: Transition {
from: ""
to: "active"
reversible: true
ParallelAnimation {
RotationAnimation {
duration: 200
easing.type: Easing.InOutCubic
}
ColorAnimation {
duration: 200
easing.type: Easing.OutCubic
}
}
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: workspace.modelData.activate()
}
}

View file

@ -0,0 +1,17 @@
import QtQuick
import QtQuick.Controls
import Quickshell.Hyprland
import "../../../../config/"
Row {
id: root
spacing: Dimensions.workspace.spacing
Repeater {
model: Hyprland.workspaces
Workspace {}
}
}