diff --git a/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml b/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml index 51e7fe40c..85728c754 100644 --- a/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml +++ b/dots/.config/quickshell/ii/modules/waffle/looks/Looks.qml @@ -177,7 +177,7 @@ Singleton { property Component color: Component { ColorAnimation { - duration: 120 + duration: 70 easing.type: Easing.BezierSpline easing.bezierCurve: transition.easing.bezierCurve.easeIn } diff --git a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml index 7c7153fb9..79f08fc79 100644 --- a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml +++ b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewContent.qml @@ -64,8 +64,9 @@ Rectangle { color: Looks.colors.bgPanelFooterBase implicitHeight: 174 - + ListView { + id: workspaceListView anchors { top: parent.top bottom: parent.bottom @@ -73,17 +74,19 @@ Rectangle { topMargin: 5 bottomMargin: 5 } + flickableDirection: Flickable.HorizontalFlick + orientation: ListView.Horizontal + interactive: width == parent.width width: Math.min(contentWidth + leftMargin + rightMargin, parent.width) leftMargin: 5 rightMargin: 5 clip: true - orientation: ListView.Horizontal spacing: 4 model: ScriptModel { values: { - const maxWorkspaceId = Math.max.apply(null, HyprlandData.workspaces.map(ws => ws.id)) - return Array(maxWorkspaceId) + const maxWorkspaceId = Math.max.apply(null, HyprlandData.workspaces.map(ws => ws.id)); + return Array(Math.max(maxWorkspaceId, 1)); } } delegate: TaskViewWorkspace { diff --git a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWorkspace.qml b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWorkspace.qml index 987511f05..b285d91e0 100644 --- a/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWorkspace.qml +++ b/dots/.config/quickshell/ii/modules/waffle/taskView/TaskViewWorkspace.qml @@ -16,6 +16,7 @@ WMouseAreaButton { required property int workspace + readonly property bool isActiveWorkspace: HyprlandData.activeWorkspace?.id === root.workspace readonly property real screenWidth: QsWindow.window.width readonly property real screenHeight: QsWindow.window.height readonly property real screenAspectRatio: screenWidth / screenHeight @@ -30,6 +31,12 @@ WMouseAreaButton { Hyprland.dispatch(`workspace ${root.workspace}`); } + colBackground: ColorUtils.transparentize(Looks.colors.bg2, isActiveWorkspace ? 0 : 1) + Behavior on color { + animation: Looks.transition.color.createObject(this) + } + + // Content ColumnLayout { anchors { fill: parent @@ -94,4 +101,21 @@ WMouseAreaButton { } } } + + // Active indicator + WFadeLoader { + anchors { + horizontalCenter: parent.horizontalCenter + bottom: parent.bottom + } + shown: root.isActiveWorkspace + + sourceComponent: Rectangle { + id: activeIndicator + implicitWidth: 32 + implicitHeight: 3 + color: Looks.colors.accent + radius: height / 2 + } + } }