add quickshell
This commit is contained in:
parent
3d48e35de5
commit
10960f620d
32 changed files with 1415 additions and 11 deletions
47
quickshell/Workspaces.qml
Normal file
47
quickshell/Workspaces.qml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
RowLayout {
|
||||
spacing: Theme.spacing
|
||||
|
||||
Repeater {
|
||||
model: niri.workspaces
|
||||
|
||||
// Container com largura fixa — o layout nunca muda
|
||||
Item {
|
||||
required property var modelData
|
||||
|
||||
readonly property bool focused: modelData.isFocused
|
||||
readonly property bool occupied: modelData.activeWindowId !== null
|
||||
|
||||
width: 24
|
||||
height: 8
|
||||
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
height: parent.height
|
||||
radius: height / 2
|
||||
|
||||
width: parent.focused ? 20 : 8
|
||||
color: {
|
||||
if (parent.focused) return Theme.accent
|
||||
if (parent.occupied) return Theme.subtle
|
||||
return Theme.muted
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
|
||||
}
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: 150 }
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: niri.focusWorkspaceById(modelData.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue