diff --git a/modules/Bar.qml b/modules/Bar.qml index 25673d1..28a7868 100644 --- a/modules/Bar.qml +++ b/modules/Bar.qml @@ -50,7 +50,6 @@ PanelWindow { anchors.verticalCenter: parent.verticalCenter spacing: M.Theme.barSpacing - M.Workspaces { visible: M.Modules.workspaces } M.Tray { bar: bar visible: M.Modules.tray diff --git a/modules/Flyout.qml b/modules/Flyout.qml index e67c86f..69fde22 100644 --- a/modules/Flyout.qml +++ b/modules/Flyout.qml @@ -33,7 +33,7 @@ PanelWindow { Rectangle { anchors.fill: parent color: M.Theme.base00 - opacity: Math.max(M.Theme.barOpacity, 0.85) + opacity: M.Theme.barOpacity topLeftRadius: 0 topRightRadius: 0 bottomLeftRadius: M.Theme.radius diff --git a/modules/Modules.qml b/modules/Modules.qml index b7645f6..4476b57 100644 --- a/modules/Modules.qml +++ b/modules/Modules.qml @@ -7,7 +7,6 @@ import Quickshell.Io QtObject { id: root - property bool workspaces: true property bool tray: true property bool windowTitle: true property bool clock: true diff --git a/modules/Workspaces.qml b/modules/Workspaces.qml index 6f45225..d379941 100644 --- a/modules/Workspaces.qml +++ b/modules/Workspaces.qml @@ -1,93 +1,7 @@ import QtQuick -import Quickshell.Io -import "." as M +import QtQuick.Layouts -Row { - id: root - spacing: 4 - - property var _workspaces: [] - property int _activeId: -1 - - // Initial state - Process { - id: initProc - running: true - command: ["niri", "msg", "--json", "workspaces"] - stdout: StdioCollector { - onStreamFinished: { - try { - const ws = JSON.parse(text); - root._workspaces = ws.sort((a, b) => a.idx - b.idx); - for (const w of ws) { - if (w.is_focused) - root._activeId = w.id; - } - } catch (e) {} - } - } - } - - // Live updates - Process { - id: eventStream - running: true - command: ["niri", "msg", "--json", "event-stream"] - stdout: SplitParser { - splitMarker: "\n" - onRead: line => { - try { - const ev = JSON.parse(line); - if (ev.WorkspacesChanged !== undefined) { - root._workspaces = ev.WorkspacesChanged.workspaces - .sort((a, b) => a.idx - b.idx); - } else if (ev.WorkspaceActivated !== undefined) { - if (ev.WorkspaceActivated.focused) - root._activeId = ev.WorkspaceActivated.id; - } - } catch (e) {} - } - } - } - - Process { - id: switchProc - property int wsId: -1 - command: ["niri", "msg", "action", "focus-workspace", String(wsId)] - } - - Repeater { - model: root._workspaces - - delegate: Rectangle { - id: pill - - required property var modelData - - readonly property bool active: modelData.id === root._activeId - - width: 20 - height: 20 - radius: M.Theme.radius - color: pill.active ? M.Theme.base0D : M.Theme.base02 - - Text { - anchors.centerIn: parent - text: pill.modelData.idx - color: pill.active ? M.Theme.base00 : M.Theme.base04 - font.pixelSize: M.Theme.fontSize - 2 - font.family: M.Theme.fontFamily - font.bold: pill.active - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - switchProc.wsId = pill.modelData.id; - switchProc.running = true; - } - } - } - } +// Placeholder — Quickshell.Services.Niri not yet available +RowLayout { + spacing: M.Theme.moduleSpacing } diff --git a/nix/hm-module.nix b/nix/hm-module.nix index eb27d33..ce34b6a 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -58,7 +58,6 @@ in type = lib.types.submodule { options = lib.genAttrs [ - "workspaces" "tray" "windowTitle" "clock"