summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-14 16:59:19 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-14 16:59:19 +1000
commit4b221e2fd5b7faf4747cff6c590b6ddc38870901 (patch)
tree3041635aa0e94a7783410ccf76424143060fa605 /services
parentinternal: close panels when fullscreen app (diff)
downloadcaelestia-shell-4b221e2fd5b7faf4747cff6c590b6ddc38870901.tar.gz
caelestia-shell-4b221e2fd5b7faf4747cff6c590b6ddc38870901.tar.bz2
caelestia-shell-4b221e2fd5b7faf4747cff6c590b6ddc38870901.zip
utilities: add recording control
Diffstat (limited to 'services')
-rw-r--r--services/Recorder.qml38
1 files changed, 38 insertions, 0 deletions
diff --git a/services/Recorder.qml b/services/Recorder.qml
new file mode 100644
index 0000000..370bfd8
--- /dev/null
+++ b/services/Recorder.qml
@@ -0,0 +1,38 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+
+Singleton {
+ id: root
+
+ readonly property alias running: props.running
+ readonly property alias paused: props.paused
+
+ function toggle(): void {
+ Quickshell.execDetached(["caelestia", "record"]);
+ props.running = !props.running;
+ if (!props.running)
+ props.paused = false;
+ }
+
+ function togglePause(): void {
+ Quickshell.execDetached(["caelestia", "record", "-p"]);
+ props.paused = !props.paused;
+ }
+
+ PersistentProperties {
+ id: props
+
+ property bool running: false
+ property bool paused: false
+
+ reloadableId: "recorder"
+ }
+
+ Process {
+ running: true
+ command: ["pidof", "gpu-screen-recorder"]
+ onExited: code => props.running = code === 0
+ }
+}