summaryrefslogtreecommitdiff
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
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
-rw-r--r--modules/areapicker/Picker.qml6
-rw-r--r--modules/bar/Bar.qml8
-rw-r--r--modules/bar/components/ActiveWindow.qml4
-rw-r--r--modules/bar/components/StatusIcons.qml2
-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
-rw-r--r--modules/bar/popouts/ActiveWindow.qml10
-rw-r--r--modules/bar/popouts/KbLayout.qml2
-rw-r--r--modules/bar/popouts/Wrapper.qml2
-rw-r--r--modules/windowinfo/Buttons.qml10
-rw-r--r--services/Brightness.qml4
-rw-r--r--services/Hypr.qml (renamed from services/Hyprland.qml)0
-rw-r--r--services/Visibilities.qml5
14 files changed, 39 insertions, 40 deletions
diff --git a/modules/areapicker/Picker.qml b/modules/areapicker/Picker.qml
index 53b200e..9392c81 100644
--- a/modules/areapicker/Picker.qml
+++ b/modules/areapicker/Picker.qml
@@ -37,8 +37,8 @@ MouseArea {
property real sh: Math.abs(sy - ey)
property list<var> clients: {
- const ws = Hyprland.activeToplevel?.workspace?.id ?? Hyprland.activeWsId;
- return Hyprland.toplevels.values.filter(c => c.workspace?.id === ws).sort((a, b) => {
+ const ws = Hypr.activeToplevel?.workspace?.id ?? Hypr.activeWsId;
+ return Hypr.toplevels.values.filter(c => c.workspace?.id === ws).sort((a, b) => {
// Pinned first, then fullscreen, then floating, then any other
const ac = a.lastIpcObject;
const bc = b.lastIpcObject;
@@ -164,7 +164,7 @@ MouseArea {
}
Connections {
- target: Hyprland
+ target: Hypr
function onActiveWsIdChanged(): void {
root.checkClientRects(root.mouseX, root.mouseY);
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml
index 518b72b..0382b5d 100644
--- a/modules/bar/Bar.qml
+++ b/modules/bar/Bar.qml
@@ -56,12 +56,12 @@ ColumnLayout {
const ch = childAt(width / 2, y) as WrappedLoader;
if (ch?.id === "workspaces") {
// Workspace scroll
- const mon = (Config.bar.workspaces.perMonitorWorkspaces ? Hyprland.monitorFor(screen) : Hyprland.focusedMonitor);
+ const mon = (Config.bar.workspaces.perMonitorWorkspaces ? Hypr.monitorFor(screen) : Hypr.focusedMonitor);
const specialWs = mon?.lastIpcObject.specialWorkspace.name;
if (specialWs?.length > 0)
- Hyprland.dispatch(`togglespecialworkspace ${specialWs.slice(8)}`);
- else if (angleDelta.y < 0 || (Config.bar.workspaces.perMonitorWorkspaces ? mon.activeWorkspace?.id : Hyprland.activeWsId) > 1)
- Hyprland.dispatch(`workspace r${angleDelta.y > 0 ? "-" : "+"}1`);
+ Hypr.dispatch(`togglespecialworkspace ${specialWs.slice(8)}`);
+ else if (angleDelta.y < 0 || (Config.bar.workspaces.perMonitorWorkspaces ? mon.activeWorkspace?.id : Hypr.activeWsId) > 1)
+ Hypr.dispatch(`workspace r${angleDelta.y > 0 ? "-" : "+"}1`);
} else if (y < screen.height / 2) {
// Volume scroll on top half
if (angleDelta.y > 0)
diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml
index 3bea956..3b897c0 100644
--- a/modules/bar/components/ActiveWindow.qml
+++ b/modules/bar/components/ActiveWindow.qml
@@ -31,7 +31,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
animate: true
- text: Icons.getAppCategoryIcon(Hyprland.activeToplevel?.lastIpcObject.class, "desktop_windows")
+ text: Icons.getAppCategoryIcon(Hypr.activeToplevel?.lastIpcObject.class, "desktop_windows")
color: root.colour
}
@@ -46,7 +46,7 @@ Item {
TextMetrics {
id: metrics
- text: Hyprland.activeToplevel?.title ?? qsTr("Desktop")
+ text: Hypr.activeToplevel?.title ?? qsTr("Desktop")
font.pointSize: Appearance.font.size.smaller
font.family: Appearance.font.family.mono
elide: Qt.ElideRight
diff --git a/modules/bar/components/StatusIcons.qml b/modules/bar/components/StatusIcons.qml
index f1e3ffe..01284c6 100644
--- a/modules/bar/components/StatusIcons.qml
+++ b/modules/bar/components/StatusIcons.qml
@@ -48,7 +48,7 @@ StyledRect {
sourceComponent: StyledText {
animate: true
- text: Hyprland.kbLayout
+ text: Hypr.kbLayout
color: root.colour
font.family: Appearance.font.family.mono
}
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");
}
}
diff --git a/modules/bar/popouts/ActiveWindow.qml b/modules/bar/popouts/ActiveWindow.qml
index cad2bd8..adf7b77 100644
--- a/modules/bar/popouts/ActiveWindow.qml
+++ b/modules/bar/popouts/ActiveWindow.qml
@@ -12,7 +12,7 @@ Item {
required property Item wrapper
- implicitWidth: Hyprland.activeToplevel ? child.implicitWidth : -Appearance.padding.large * 2
+ implicitWidth: Hypr.activeToplevel ? child.implicitWidth : -Appearance.padding.large * 2
implicitHeight: child.implicitHeight
Column {
@@ -33,7 +33,7 @@ Item {
Layout.alignment: Qt.AlignVCenter
implicitSize: details.implicitHeight
- source: Icons.getAppIcon(Hyprland.activeToplevel?.lastIpcObject.class ?? "", "image-missing")
+ source: Icons.getAppIcon(Hypr.activeToplevel?.lastIpcObject.class ?? "", "image-missing")
}
ColumnLayout {
@@ -44,14 +44,14 @@ Item {
StyledText {
Layout.fillWidth: true
- text: Hyprland.activeToplevel?.title ?? ""
+ text: Hypr.activeToplevel?.title ?? ""
font.pointSize: Appearance.font.size.normal
elide: Text.ElideRight
}
StyledText {
Layout.fillWidth: true
- text: Hyprland.activeToplevel?.lastIpcObject.class ?? ""
+ text: Hypr.activeToplevel?.lastIpcObject.class ?? ""
color: Colours.palette.m3onSurfaceVariant
elide: Text.ElideRight
}
@@ -91,7 +91,7 @@ Item {
ScreencopyView {
id: preview
- captureSource: Hyprland.activeToplevel?.wayland ?? null
+ captureSource: Hypr.activeToplevel?.wayland ?? null
live: visible
constraintSize.width: Config.bar.sizes.windowPreviewSize
diff --git a/modules/bar/popouts/KbLayout.qml b/modules/bar/popouts/KbLayout.qml
index ea7c490..8e5ae8d 100644
--- a/modules/bar/popouts/KbLayout.qml
+++ b/modules/bar/popouts/KbLayout.qml
@@ -2,5 +2,5 @@ import qs.components
import qs.services
StyledText {
- text: qsTr("Keyboard layout: %1").arg(Hyprland.kbLayoutFull)
+ text: qsTr("Keyboard layout: %1").arg(Hypr.kbLayoutFull)
}
diff --git a/modules/bar/popouts/Wrapper.qml b/modules/bar/popouts/Wrapper.qml
index 7cc3c79..845826d 100644
--- a/modules/bar/popouts/Wrapper.qml
+++ b/modules/bar/popouts/Wrapper.qml
@@ -89,7 +89,7 @@ Item {
sourceComponent: WindowInfo {
screen: root.screen
- client: Hyprland.activeToplevel
+ client: Hypr.activeToplevel
}
}
diff --git a/modules/windowinfo/Buttons.qml b/modules/windowinfo/Buttons.qml
index 67e97a2..7cb767e 100644
--- a/modules/windowinfo/Buttons.qml
+++ b/modules/windowinfo/Buttons.qml
@@ -78,7 +78,7 @@ ColumnLayout {
Button {
required property int index
- readonly property int wsId: Math.floor((Hyprland.activeWsId - 1) / 10) * 10 + index + 1
+ readonly property int wsId: Math.floor((Hypr.activeWsId - 1) / 10) * 10 + index + 1
readonly property bool isCurrent: root.client?.workspace.id === wsId
color: isCurrent ? Colours.tPalette.m3surfaceContainerHighest : Colours.palette.m3tertiaryContainer
@@ -87,7 +87,7 @@ ColumnLayout {
disabled: isCurrent
function onClicked(): void {
- Hyprland.dispatch(`movetoworkspace ${wsId},address:0x${root.client?.address}`);
+ Hypr.dispatch(`movetoworkspace ${wsId},address:0x${root.client?.address}`);
}
}
}
@@ -116,7 +116,7 @@ ColumnLayout {
text: root.client?.lastIpcObject.floating ? qsTr("Tile") : qsTr("Float")
function onClicked(): void {
- Hyprland.dispatch(`togglefloating address:0x${root.client?.address}`);
+ Hypr.dispatch(`togglefloating address:0x${root.client?.address}`);
}
}
@@ -133,7 +133,7 @@ ColumnLayout {
text: root.client?.lastIpcObject.pinned ? qsTr("Unpin") : qsTr("Pin")
function onClicked(): void {
- Hyprland.dispatch(`pin address:0x${root.client?.address}`);
+ Hypr.dispatch(`pin address:0x${root.client?.address}`);
}
}
}
@@ -144,7 +144,7 @@ ColumnLayout {
text: qsTr("Kill")
function onClicked(): void {
- Hyprland.dispatch(`killwindow address:0x${root.client?.address}`);
+ Hypr.dispatch(`killwindow address:0x${root.client?.address}`);
}
}
}
diff --git a/services/Brightness.qml b/services/Brightness.qml
index 954f76d..086bc65 100644
--- a/services/Brightness.qml
+++ b/services/Brightness.qml
@@ -18,14 +18,14 @@ Singleton {
}
function increaseBrightness(): void {
- const focusedName = Hyprland.focusedMonitor.name;
+ const focusedName = Hypr.focusedMonitor.name;
const monitor = monitors.find(m => focusedName === m.modelData.name);
if (monitor)
monitor.setBrightness(monitor.brightness + 0.1);
}
function decreaseBrightness(): void {
- const focusedName = Hyprland.focusedMonitor.name;
+ const focusedName = Hypr.focusedMonitor.name;
const monitor = monitors.find(m => focusedName === m.modelData.name);
if (monitor)
monitor.setBrightness(monitor.brightness - 0.1);
diff --git a/services/Hyprland.qml b/services/Hypr.qml
index 0f31453..0f31453 100644
--- a/services/Hyprland.qml
+++ b/services/Hypr.qml
diff --git a/services/Visibilities.qml b/services/Visibilities.qml
index bd431db..0f09e3a 100644
--- a/services/Visibilities.qml
+++ b/services/Visibilities.qml
@@ -1,16 +1,15 @@
pragma Singleton
import Quickshell
-import Quickshell.Hyprland
Singleton {
property var screens: new Map()
function load(screen: ShellScreen, visibilities: var): void {
- screens.set(Hyprland.monitorFor(screen), visibilities);
+ screens.set(Hypr.monitorFor(screen), visibilities);
}
function getForActive(): PersistentProperties {
- return screens.get(Hyprland.focusedMonitor);
+ return screens.get(Hypr.focusedMonitor);
}
}