initial commit
This commit is contained in:
commit
9fde6d4fc6
27 changed files with 1110 additions and 0 deletions
36
modules/Workspaces.qml
Normal file
36
modules/Workspaces.qml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell.Services.Niri
|
||||
import "." as M
|
||||
|
||||
RowLayout {
|
||||
spacing: 4
|
||||
|
||||
Repeater {
|
||||
model: Niri.workspaces
|
||||
|
||||
delegate: Rectangle {
|
||||
required property var modelData
|
||||
|
||||
implicitWidth: 24
|
||||
implicitHeight: 20
|
||||
radius: 4
|
||||
color: modelData.isFocused
|
||||
? M.Theme.base0D
|
||||
: (modelData.isActive ? M.Theme.base03 : M.Theme.base02)
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: modelData.idx ?? modelData.id
|
||||
color: modelData.isFocused ? M.Theme.base00 : M.Theme.base05
|
||||
font.pixelSize: M.Theme.fontSize
|
||||
font.family: M.Theme.fontFamily
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: Niri.dispatch(["action", "focus-workspace", String(modelData.id)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue