summaryrefslogtreecommitdiff
path: root/scripts/record_window.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-10-09 17:42:22 +0100
committerdavidovski <david@davidovski.xyz>2023-10-09 17:42:22 +0100
commit02a4a3a4c1e6116158b807674709f26933ac5b10 (patch)
tree84f325f6e8ed2a6ccc618ebb358cea8f1faa95e9 /scripts/record_window.sh
parent051ed527f64b0d7f400f76244b3d63a7ac98bb70 (diff)
Add desktop background
Diffstat (limited to 'scripts/record_window.sh')
-rwxr-xr-xscripts/record_window.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/record_window.sh b/scripts/record_window.sh
index f3cf452..841b756 100755
--- a/scripts/record_window.sh
+++ b/scripts/record_window.sh
@@ -9,13 +9,11 @@ width=$(cat $info | grep Width | cut -d' ' -f4)
height=$(cat $info | grep Height | cut -d' ' -f4)
size="${width}x${height}"
-x=$(cat $info | grep "Absolute upper-left X" | cut -d' ' -f7)
-y=$(cat $info | grep "Absolute upper-left Y" | cut -d' ' -f7)
-position="+$x,$y"
+position=+$(echo $geom | cut -d'+' -f2- | sed "s/+/,/g")
-filename=$(date +"%F_%T.mp4")
+filename=$(date +"$HOME/pics/screenshot/%F_%T.mp4")
echo $size and $position
-ffmpeg -y -f x11grab -video_size $size -i "$position" $filename
+ffmpeg -y -f x11grab -video_size $size -i $position $filename
rm $info