summaryrefslogtreecommitdiff
path: root/services/Hypr.qml
diff options
context:
space:
mode:
Diffstat (limited to 'services/Hypr.qml')
-rw-r--r--services/Hypr.qml56
1 files changed, 1 insertions, 55 deletions
diff --git a/services/Hypr.qml b/services/Hypr.qml
index c703f70..77ba264 100644
--- a/services/Hypr.qml
+++ b/services/Hypr.qml
@@ -18,7 +18,7 @@ Singleton {
readonly property HyprlandToplevel activeToplevel: {
const t = Hyprland.activeToplevel;
- return t?.workspace?.name.startsWith("special:") || Hyprland.focusedWorkspace?.toplevels.values.length > 0 ? t : null;
+ return Hyprland.focusedWorkspace?.toplevels.values.length > 0 ? t : null;
}
readonly property HyprlandWorkspace focusedWorkspace: Hyprland.focusedWorkspace
readonly property HyprlandMonitor focusedMonitor: Hyprland.focusedMonitor
@@ -37,7 +37,6 @@ Singleton {
readonly property alias devices: extras.devices
property bool hadKeyboard
- property string lastSpecialWorkspace: ""
signal configReloaded
@@ -45,39 +44,6 @@ Singleton {
Hyprland.dispatch(request);
}
- function cycleSpecialWorkspace(direction: string): void {
- const openSpecials = workspaces.values.filter(w => w.name.startsWith("special:") && w.lastIpcObject.windows > 0);
-
- if (openSpecials.length === 0)
- return;
-
- const activeSpecial = focusedMonitor.lastIpcObject.specialWorkspace.name ?? "";
-
- if (!activeSpecial) {
- if (lastSpecialWorkspace) {
- const workspace = workspaces.values.find(w => w.name === lastSpecialWorkspace);
- if (workspace && workspace.lastIpcObject.windows > 0) {
- dispatch(`workspace ${lastSpecialWorkspace}`);
- return;
- }
- }
- dispatch(`workspace ${openSpecials[0].name}`);
- return;
- }
-
- const currentIndex = openSpecials.findIndex(w => w.name === activeSpecial);
- let nextIndex = 0;
-
- if (currentIndex !== -1) {
- if (direction === "next")
- nextIndex = (currentIndex + 1) % openSpecials.length;
- else
- nextIndex = (currentIndex - 1 + openSpecials.length) % openSpecials.length;
- }
-
- dispatch(`workspace ${openSpecials[nextIndex].name}`);
- }
-
function monitorNames(): list<string> {
return monitors.values.map(e => e.name);
}
@@ -146,18 +112,6 @@ Singleton {
}
}
- Connections {
- target: root.focusedMonitor
-
- function onLastIpcObjectChanged(): void {
- const specialName = root.focusedMonitor.lastIpcObject.specialWorkspace.name;
-
- if (specialName && specialName.startsWith("special:")) {
- root.lastSpecialWorkspace = specialName;
- }
- }
- }
-
FileView {
id: kbLayoutFile
@@ -197,14 +151,6 @@ Singleton {
function refreshDevices(): void {
extras.refreshDevices();
}
-
- function cycleSpecialWorkspace(direction: string): void {
- root.cycleSpecialWorkspace(direction);
- }
-
- function listSpecialWorkspaces(): string {
- return root.workspaces.values.filter(w => w.name.startsWith("special:") && w.lastIpcObject.windows > 0).map(w => w.name).join("\n");
- }
}
CustomShortcut {