summaryrefslogtreecommitdiff
path: root/services/Recorder.qml
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-01-08 16:26:49 -0500
committerFreya Murphy <freya@freyacat.org>2026-01-08 16:26:49 -0500
commit5581a4b34f7ef70005a26e2b955df33414533791 (patch)
treefc8a46997292aa9632216c1c904deb3858fd19c0 /services/Recorder.qml
parentonly support one color scheme (diff)
downloadcaelestia-shell-5581a4b34f7ef70005a26e2b955df33414533791.tar.gz
caelestia-shell-5581a4b34f7ef70005a26e2b955df33414533791.tar.bz2
caelestia-shell-5581a4b34f7ef70005a26e2b955df33414533791.zip
remove recording
Diffstat (limited to 'services/Recorder.qml')
-rw-r--r--services/Recorder.qml82
1 files changed, 0 insertions, 82 deletions
diff --git a/services/Recorder.qml b/services/Recorder.qml
deleted file mode 100644
index e4ce6a8..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: list<string>): 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++;
- }
- }
-}