summaryrefslogtreecommitdiff
path: root/modules/bar/components/workspaces
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-24 14:14:30 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-24 14:14:30 +1000
commitd1e5f484461e27133317c78b81347d05dc3a2760 (patch)
tree7e84f152a66b69366d6abb67af63ec7306fca7bd /modules/bar/components/workspaces
parent[CI] chore: update flake (diff)
downloadcaelestia-shell-d1e5f484461e27133317c78b81347d05dc3a2760.tar.gz
caelestia-shell-d1e5f484461e27133317c78b81347d05dc3a2760.tar.bz2
caelestia-shell-d1e5f484461e27133317c78b81347d05dc3a2760.zip
internal: rename Hyprland -> Hypr
Prevent shadowing Fixes window info not changing on switching to an empty workspace
Diffstat (limited to 'modules/bar/components/workspaces')
-rw-r--r--modules/bar/components/workspaces/SpecialWorkspaces.qml12
-rw-r--r--modules/bar/components/workspaces/Workspace.qml2
-rw-r--r--modules/bar/components/workspaces/Workspaces.qml12
3 files changed, 13 insertions, 13 deletions
diff --git a/modules/bar/components/workspaces/SpecialWorkspaces.qml b/modules/bar/components/workspaces/SpecialWorkspaces.qml
index fb31257..00beff9 100644
--- a/modules/bar/components/workspaces/SpecialWorkspaces.qml
+++ b/modules/bar/components/workspaces/SpecialWorkspaces.qml
@@ -14,8 +14,8 @@ Item {
id: root
required property ShellScreen screen
- readonly property HyprlandMonitor monitor: Hyprland.monitorFor(screen)
- readonly property string activeSpecial: (Config.bar.workspaces.perMonitorWorkspaces ? monitor : Hyprland.focusedMonitor)?.lastIpcObject.specialWorkspace.name ?? ""
+ readonly property HyprlandMonitor monitor: Hypr.monitorFor(screen)
+ readonly property string activeSpecial: (Config.bar.workspaces.perMonitorWorkspaces ? monitor : Hypr.focusedMonitor)?.lastIpcObject.specialWorkspace.name ?? ""
layer.enabled: true
layer.effect: ShaderEffect {
@@ -98,7 +98,7 @@ Item {
onCurrentIndexChanged: currentIndex = Qt.binding(() => model.values.findIndex(w => w.name === root.activeSpecial))
model: ScriptModel {
- values: Hyprland.workspaces.values.filter(w => w.name.startsWith("special:") && (!Config.bar.workspaces.perMonitorWorkspaces || w.monitor === root.monitor))
+ values: Hypr.workspaces.values.filter(w => w.name.startsWith("special:") && (!Config.bar.workspaces.perMonitorWorkspaces || w.monitor === root.monitor))
}
preferredHighlightBegin: 0
@@ -229,7 +229,7 @@ Item {
Repeater {
model: ScriptModel {
- values: Hyprland.toplevels.values.filter(c => c.workspace?.id === ws.wsId)
+ values: Hypr.toplevels.values.filter(c => c.workspace?.id === ws.wsId)
}
MaterialIcon {
@@ -357,9 +357,9 @@ Item {
const ws = view.itemAt(event.x, event.y);
if (ws?.modelData)
- Hyprland.dispatch(`togglespecialworkspace ${ws.modelData.name.slice(8)}`);
+ Hypr.dispatch(`togglespecialworkspace ${ws.modelData.name.slice(8)}`);
else
- Hyprland.dispatch("togglespecialworkspace special");
+ Hypr.dispatch("togglespecialworkspace special");
}
}
diff --git a/modules/bar/components/workspaces/Workspace.qml b/modules/bar/components/workspaces/Workspace.qml
index 6bd230b..8124024 100644
--- a/modules/bar/components/workspaces/Workspace.qml
+++ b/modules/bar/components/workspaces/Workspace.qml
@@ -80,7 +80,7 @@ ColumnLayout {
Repeater {
model: ScriptModel {
- values: Hyprland.toplevels.values.filter(c => c.workspace?.id === root.ws)
+ values: Hypr.toplevels.values.filter(c => c.workspace?.id === root.ws)
}
MaterialIcon {
diff --git a/modules/bar/components/workspaces/Workspaces.qml b/modules/bar/components/workspaces/Workspaces.qml
index 7b92ffa..c9a90e8 100644
--- a/modules/bar/components/workspaces/Workspaces.qml
+++ b/modules/bar/components/workspaces/Workspaces.qml
@@ -13,10 +13,10 @@ StyledClippingRect {
required property ShellScreen screen
- readonly property bool onSpecial: (Config.bar.workspaces.perMonitorWorkspaces ? Hyprland.monitorFor(screen) : Hyprland.focusedMonitor)?.lastIpcObject.specialWorkspace.name !== ""
- readonly property int activeWsId: Config.bar.workspaces.perMonitorWorkspaces ? (Hyprland.monitorFor(screen).activeWorkspace?.id ?? 1) : Hyprland.activeWsId
+ readonly property bool onSpecial: (Config.bar.workspaces.perMonitorWorkspaces ? Hypr.monitorFor(screen) : Hypr.focusedMonitor)?.lastIpcObject.specialWorkspace.name !== ""
+ readonly property int activeWsId: Config.bar.workspaces.perMonitorWorkspaces ? (Hypr.monitorFor(screen).activeWorkspace?.id ?? 1) : Hypr.activeWsId
- readonly property var occupied: Hyprland.workspaces.values.reduce((acc, curr) => {
+ readonly property var occupied: Hypr.workspaces.values.reduce((acc, curr) => {
acc[curr.id] = curr.lastIpcObject.windows > 0;
return acc;
}, {})
@@ -91,10 +91,10 @@ StyledClippingRect {
anchors.fill: layout
onClicked: event => {
const ws = layout.childAt(event.x, event.y).index + root.groupOffset + 1;
- if (Hyprland.activeWsId !== ws)
- Hyprland.dispatch(`workspace ${ws}`);
+ if (Hypr.activeWsId !== ws)
+ Hypr.dispatch(`workspace ${ws}`);
else
- Hyprland.dispatch("togglespecialworkspace special");
+ Hypr.dispatch("togglespecialworkspace special");
}
}