Compare commits
3 commits
3c9f6e78cc
...
d92a46035d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d92a46035d | ||
|
|
61051b7b7b | ||
|
|
b69e7e5c01 |
3 changed files with 69 additions and 34 deletions
|
|
@ -10,6 +10,7 @@ PanelWindow {
|
||||||
required property var screen
|
required property var screen
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
layer: WlrLayer.Bottom
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: true
|
top: true
|
||||||
|
|
@ -33,39 +34,31 @@ PanelWindow {
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
// ---- left ----
|
// ---- left ----
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.left: parent.left
|
Layout.fillWidth: true
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
|
||||||
// M.Workspaces {}
|
M.Workspaces {}
|
||||||
M.Tray { bar: bar }
|
M.Tray { bar: bar }
|
||||||
M.WindowTitle { Layout.maximumWidth: 400 }
|
M.WindowTitle { Layout.maximumWidth: 400 }
|
||||||
}
|
Item { Layout.fillWidth: true }
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- center ----
|
// ---- center ----
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
|
||||||
M.Clock {}
|
M.Clock {}
|
||||||
M.Notifications {}
|
M.Notifications {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- right ----
|
// ---- right ----
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.right: parent.right
|
Layout.fillWidth: true
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
||||||
|
Item { Layout.fillWidth: true }
|
||||||
M.Mpris {}
|
M.Mpris {}
|
||||||
M.Volume {}
|
M.Volume {}
|
||||||
M.Bluetooth {}
|
M.Bluetooth {}
|
||||||
|
|
@ -83,4 +76,3 @@ PanelWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
// Niri workspace support disabled — Quickshell.Services.Niri not available
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
source: "WorkspacesInner.qml"
|
||||||
|
onStatusChanged: {
|
||||||
|
if (status === Loader.Error)
|
||||||
|
source = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
36
modules/WorkspacesInner.qml
Normal file
36
modules/WorkspacesInner.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