aboutsummaryrefslogtreecommitdiff
path: root/record-selected.sh
diff options
context:
space:
mode:
Diffstat (limited to 'record-selected.sh')
-rwxr-xr-xrecord-selected.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/record-selected.sh b/record-selected.sh
new file mode 100755
index 0000000..5782ac3
--- /dev/null
+++ b/record-selected.sh
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+window=$(xdotool selectwindow)
+active_sink="$(pactl get-default-sink).monitor"
+mkdir -p "$HOME/Videos"
+video="$HOME/Videos/$(date +"Video_%Y-%m-%d_%H-%M-%S.mp4")"
+gpu-screen-recorder -w "$window" -c mp4 -f 60 -a "${active_sink}.monitor" -o "$video"
+notify-send "GPU Screen Recorder" "Saved video to $video"