summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-01-22 09:02:54 -0500
committerFreya Murphy <freya@freyacat.org>2026-03-16 09:45:27 -0400
commit6d9f0c1526c51ed1bc8102c135aae56a0bc0e1ef (patch)
tree9c77312e5a873647d3540331413dbe691e6768f2 /services
parentremove lockscreen (diff)
downloadcaelestia-shell-6d9f0c1526c51ed1bc8102c135aae56a0bc0e1ef.tar.gz
caelestia-shell-6d9f0c1526c51ed1bc8102c135aae56a0bc0e1ef.tar.bz2
caelestia-shell-6d9f0c1526c51ed1bc8102c135aae56a0bc0e1ef.zip
fix rebase
Diffstat (limited to 'services')
-rw-r--r--services/Hypr.qml56
-rw-r--r--services/Recorder.qml82
2 files changed, 1 insertions, 137 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 {
diff --git a/services/Recorder.qml b/services/Recorder.qml
deleted file mode 100644
index 6eddce9..0000000
--- a/services/Recorder.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-pragma Singleton
-
-import Quickshell
-import Quickshell.Io
-import QtQuick
-
-Singleton {
- id: root
-
- readonly property alias running: props.running
- readonly property alias paused: props.paused
- readonly property alias elapsed: props.elapsed
- property bool needsStart
- property list<string> startArgs
- property bool needsStop
- property bool needsPause
-
- function start(extraArgs = []): void {
- needsStart = true;
- startArgs = extraArgs;
- checkProc.running = true;
- }
-
- function stop(): void {
- needsStop = true;
- checkProc.running = true;
- }
-
- function togglePause(): void {
- needsPause = true;
- checkProc.running = true;
- }
-
- PersistentProperties {
- id: props
-
- property bool running: false
- property bool paused: false
- property real elapsed: 0 // Might get too large for int
-
- reloadableId: "recorder"
- }
-
- Process {
- id: checkProc
-
- running: true
- command: ["pidof", "gpu-screen-recorder"]
- onExited: code => {
- props.running = code === 0;
-
- if (code === 0) {
- if (root.needsStop) {
- Quickshell.execDetached(["caelestia", "record"]);
- props.running = false;
- props.paused = false;
- } else if (root.needsPause) {
- Quickshell.execDetached(["caelestia", "record", "-p"]);
- props.paused = !props.paused;
- }
- } else if (root.needsStart) {
- Quickshell.execDetached(["caelestia", "record", ...root.startArgs]);
- props.running = true;
- props.paused = false;
- props.elapsed = 0;
- }
-
- root.needsStart = false;
- root.needsStop = false;
- root.needsPause = false;
- }
- }
-
- Connections {
- target: Time
- // enabled: props.running && !props.paused
-
- function onSecondsChanged(): void {
- props.elapsed++;
- }
- }
-}