diff --git a/default/quickshell/omarchy-shell/README.md b/default/quickshell/omarchy-shell/README.md index 85255895..39dd0d69 100644 --- a/default/quickshell/omarchy-shell/README.md +++ b/default/quickshell/omarchy-shell/README.md @@ -159,7 +159,7 @@ rewrites `shell.json` from the current `shell-defaults.json`. "centerAnchor": "calendar", "fontFamily": "JetBrainsMono Nerd Font", "layout": { - "left": [ { "id": "omarchy" }, { "id": "workspacesPro" } ], + "left": [ { "id": "omarchy" }, { "id": "workspaces" } ], "center": [ { "id": "calendar", "format": "HH:mm" } ], "right": [ { "id": "audioPanel" }, diff --git a/default/quickshell/omarchy-shell/plugins/bar-settings/BarSettingsPanel.qml b/default/quickshell/omarchy-shell/plugins/bar-settings/BarSettingsPanel.qml index 8bbc236f..c1aca8e7 100644 --- a/default/quickshell/omarchy-shell/plugins/bar-settings/BarSettingsPanel.qml +++ b/default/quickshell/omarchy-shell/plugins/bar-settings/BarSettingsPanel.qml @@ -56,7 +56,7 @@ Item { fontFamily: "JetBrainsMono Nerd Font", centerAnchor: "calendar", layout: { - left: [{ id: "omarchy" }, { id: "workspacesPro" }, { id: "activeWindow" }], + left: [{ id: "omarchy" }, { id: "workspaces" }, { id: "activeWindow" }], center: [ { id: "media" }, { id: "calendar", format: "dddd HH:mm", formatAlt: "dd MMMM 'W'ww yyyy", verticalFormat: "HH\n—\nmm" }, @@ -273,7 +273,7 @@ Item { // whenever the registry revision changes. readonly property var legacyWidgetMeta: ({ "omarchy": { name: "Omarchy menu", description: "Launches the Omarchy menu", category: "Compositor" }, - "workspaces": { name: "Workspaces (legacy)", description: "Workspace numbers, no animation", category: "Compositor" }, + "workspaces": { name: "Workspaces", description: "Workspace number indicators", category: "Compositor" }, "clock": { name: "Clock", description: "Date / time text", category: "Time" }, "weather": { name: "Weather (legacy)", description: "Tiny weather pill", category: "Info" }, "update": { name: "Updates", description: "Indicates available system updates", category: "System" }, diff --git a/default/quickshell/omarchy-shell/plugins/bar/Bar.qml b/default/quickshell/omarchy-shell/plugins/bar/Bar.qml index 85c77a86..c318ac11 100644 --- a/default/quickshell/omarchy-shell/plugins/bar/Bar.qml +++ b/default/quickshell/omarchy-shell/plugins/bar/Bar.qml @@ -291,7 +291,6 @@ Item { "powerProfile": { displayName: "Power profile", description: "power-profiles-daemon selector", category: "System", allowMultiple: false }, "systemStats": { displayName: "System stats", description: "Inline CPU + memory sparklines", category: "System", allowMultiple: false }, "weatherFlyout": { displayName: "Weather", description: "Weather pill with detail popup", category: "Info", allowMultiple: false }, - "workspacesPro": { displayName: "Workspaces", description: "Animated workspace switcher", category: "Compositor", allowMultiple: false }, "powerMenu": { displayName: "Power menu", description: "Lock / suspend / reboot / shutdown", category: "System", allowMultiple: false }, "idleInhibitor": { displayName: "Keep awake", description: "Toggle idle inhibitor", category: "System", allowMultiple: false }, "microphone": { displayName: "Microphone", description: "Mic input state and mute toggle", category: "Audio", allowMultiple: false }, diff --git a/default/quickshell/omarchy-shell/plugins/bar/README.md b/default/quickshell/omarchy-shell/plugins/bar/README.md index 999d4209..d82ed387 100644 --- a/default/quickshell/omarchy-shell/plugins/bar/README.md +++ b/default/quickshell/omarchy-shell/plugins/bar/README.md @@ -30,7 +30,7 @@ Example `shell.json` (bar subtree only shown): "left": [ { "id": "omarchy" }, { "id": "spacer", "size": 12 }, - { "id": "workspacesPro" } + { "id": "workspaces" } ], "center": [ { "id": "media" }, @@ -66,7 +66,6 @@ Example `shell.json` (bar subtree only shown): | `powerProfile` | Current power profile + popup picker | left = popup | | `systemStats` | Inline CPU + memory sparklines, popup with detail | left = popup · right = terminal | | `weatherFlyout` | Weather icon + popup with forecast | left = popup · right = full notification | -| `workspacesPro` | Animated focus indicator that slides between workspaces | left = focus · right = move window · scroll = cycle | | `powerMenu` | Power icon → popup with lock/suspend/log out/reboot/shutdown | left = popup | | `idleInhibitor` | Coffee-cup that toggles `omarchy-toggle-idle` | left = toggle | | `microphone` | Mic icon + scroll volume | left = mute toggle · middle = audio TUI · scroll = source volume | diff --git a/default/quickshell/omarchy-shell/plugins/bar/widgets/workspacesPro.qml b/default/quickshell/omarchy-shell/plugins/bar/widgets/workspacesPro.qml deleted file mode 100644 index aa373954..00000000 --- a/default/quickshell/omarchy-shell/plugins/bar/widgets/workspacesPro.qml +++ /dev/null @@ -1,131 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import Quickshell -import Quickshell.Hyprland - -Item { - id: root - - property QtObject bar: null - property string moduleName: "workspacesPro" - property var settings: ({}) - - function setting(name, fallback) { - var value = settings ? settings[name] : undefined - return value === undefined || value === null ? fallback : value - } - - readonly property var ids: bar ? bar.workspaceIds() : [1, 2, 3, 4, 5] - readonly property bool vertical: bar ? bar.vertical : false - readonly property int barSize: bar ? bar.barSize : 26 - readonly property int slotSize: vertical ? barSize : 26 - readonly property int spacing: vertical ? 4 : 4 - - readonly property int focusedIndex: { - if (!Hyprland.focusedWorkspace) return -1 - var focused = Hyprland.focusedWorkspace.id - for (var i = 0; i < ids.length; i++) if (ids[i] === focused) return i - return -1 - } - - implicitWidth: vertical ? barSize : ids.length * slotSize + (ids.length - 1) * spacing + 6 - implicitHeight: vertical ? ids.length * slotSize + (ids.length - 1) * spacing + 6 : barSize - - Rectangle { - id: indicator - width: vertical ? root.slotSize - 8 : root.slotSize - 6 - height: vertical ? root.slotSize - 6 : root.slotSize - 8 - radius: 4 - color: root.bar ? root.bar.foreground : "#cacccc" - opacity: root.focusedIndex >= 0 ? 0.25 : 0 - x: vertical ? (root.width - width) / 2 : 3 + root.focusedIndex * (root.slotSize + root.spacing) + (root.slotSize - width) / 2 - y: vertical ? 3 + root.focusedIndex * (root.slotSize + root.spacing) + (root.slotSize - height) / 2 : (root.height - height) / 2 - - Behavior on x { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } } - Behavior on y { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } } - Behavior on opacity { NumberAnimation { duration: 160 } } - } - - Loader { - anchors.fill: parent - sourceComponent: root.vertical ? verticalLayout : horizontalLayout - } - - Component { - id: horizontalLayout - - Row { - anchors.centerIn: parent - spacing: root.spacing - - Repeater { - model: root.ids - WorkspaceButton { - required property int modelData - workspaceId: modelData - } - } - } - } - - Component { - id: verticalLayout - - Column { - anchors.centerIn: parent - spacing: root.spacing - - Repeater { - model: root.ids - WorkspaceButton { - required property int modelData - workspaceId: modelData - } - } - } - } - - component WorkspaceButton: Item { - id: ws - - property int workspaceId: 0 - readonly property var workspace: root.bar ? root.bar.workspaceById(workspaceId) : null - readonly property bool occupied: workspace !== null && workspace.toplevels.values.length > 0 - readonly property bool focused: Hyprland.focusedWorkspace !== null && Hyprland.focusedWorkspace.id === workspaceId - - implicitWidth: root.slotSize - implicitHeight: root.slotSize - - Text { - anchors.centerIn: parent - text: ws.focused ? "󱓻" : (ws.workspaceId === 10 ? "0" : String(ws.workspaceId)) - color: root.bar ? root.bar.foreground : "#cacccc" - font.family: root.bar ? root.bar.fontFamily : "JetBrainsMono Nerd Font" - font.pixelSize: ws.focused ? 13 : 11 - opacity: ws.focused ? 1 : (ws.occupied || ws.workspaceId <= 5 ? 0.8 : 0.4) - - Behavior on opacity { NumberAnimation { duration: 160 } } - Behavior on font.pixelSize { NumberAnimation { duration: 160 } } - } - - MouseArea { - anchors.fill: parent - hoverEnabled: true - acceptedButtons: Qt.LeftButton | Qt.RightButton - cursorShape: Qt.PointingHandCursor - - onClicked: function(mouse) { - if (mouse.button === Qt.RightButton) { - Hyprland.dispatch("movetoworkspace " + ws.workspaceId) - } else { - root.bar.focusWorkspace(ws.workspaceId) - } - } - - onWheel: function(wheel) { - if (wheel.angleDelta.y > 0) Hyprland.dispatch("workspace e-1") - else Hyprland.dispatch("workspace e+1") - } - } - } -} diff --git a/default/quickshell/omarchy-shell/shell-defaults.json b/default/quickshell/omarchy-shell/shell-defaults.json index 769c38f0..4858850d 100644 --- a/default/quickshell/omarchy-shell/shell-defaults.json +++ b/default/quickshell/omarchy-shell/shell-defaults.json @@ -7,7 +7,7 @@ "layout": { "left": [ { "id": "omarchy" }, - { "id": "workspacesPro" }, + { "id": "workspaces" }, { "id": "activeWindow" } ], "center": [ diff --git a/default/quickshell/omarchy-shell/shell.qml b/default/quickshell/omarchy-shell/shell.qml index 48390368..5a9b898b 100644 --- a/default/quickshell/omarchy-shell/shell.qml +++ b/default/quickshell/omarchy-shell/shell.qml @@ -48,7 +48,7 @@ ShellRoot { fontFamily: "JetBrainsMono Nerd Font", centerAnchor: "calendar", layout: { - left: [{ id: "omarchy" }, { id: "workspacesPro" }], + left: [{ id: "omarchy" }, { id: "workspaces" }], center: [{ id: "calendar", format: "dddd HH:mm" }], right: [{ id: "audioPanel" }, { id: "controlCenter" }, { id: "powerMenu" }] }