aboutsummaryrefslogtreecommitdiff
path: root/scripts/start-stop-recording.sh
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-09-21 17:48:26 +0200
committerdec05eba <dec05eba@protonmail.com>2024-09-21 17:48:26 +0200
commitc21e58f16f40b9db6d9f1dfcd10d5389aef96e85 (patch)
treeb07592abe2b08c91197b49f86e3a2bcb346b7c53 /scripts/start-stop-recording.sh
parent95e1971f8fc2b9f1814a80ffa19d17fc4eda9e47 (diff)
Add start/stop example script
Diffstat (limited to 'scripts/start-stop-recording.sh')
-rwxr-xr-xscripts/start-stop-recording.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/start-stop-recording.sh b/scripts/start-stop-recording.sh
new file mode 100755
index 0000000..bbcd27f
--- /dev/null
+++ b/scripts/start-stop-recording.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Simple script to start recording if it's not recording and stop recording
+# if it's already recording. This script can be bound to a single hotkey
+# to start/stop recording with a single hotkey.
+
+killall -SIGINT -q gpu-screen-recorder && exit 1
+video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
+gpu-screen-recorder -w screen -f 60 -a default_output -o "$video"
+notify-send -t 2000 -u low "GPU Screen Recorder" "Video saved to $video"