summaryrefslogtreecommitdiff
path: root/scripts/record_window.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-27 02:29:40 +0200
committerdavidovski <david@davidovski.xyz>2023-07-27 02:29:40 +0200
commitbc668b05c41396e187fe590f03646dadd708d613 (patch)
treef5ca4e2f096a2fccec43a542a4db5d7db5edfcab /scripts/record_window.sh
parent28a625400b987e864c5a5dc76e77998f8010d8fa (diff)
Add cut cbz and zathura configs
Diffstat (limited to 'scripts/record_window.sh')
-rwxr-xr-xscripts/record_window.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/record_window.sh b/scripts/record_window.sh
index 841b756..f3cf452 100755
--- a/scripts/record_window.sh
+++ b/scripts/record_window.sh
@@ -9,11 +9,13 @@ width=$(cat $info | grep Width | cut -d' ' -f4)
height=$(cat $info | grep Height | cut -d' ' -f4)
size="${width}x${height}"
-position=+$(echo $geom | cut -d'+' -f2- | sed "s/+/,/g")
+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"
-filename=$(date +"$HOME/pics/screenshot/%F_%T.mp4")
+filename=$(date +"%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