dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 2a09bb7091781007db30cbfe7412c927c6a6131b
parent d1c6a52e7a30c2a76d0775590377639195c34162
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 25 Feb 2021 16:53:05 +0000

grab window geometry and record

Diffstat:
Abin/bin/windowcast | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/bin/bin/windowcast b/bin/bin/windowcast @@ -0,0 +1,13 @@ +#!/bin/sh + +IFS=$'\n' +array=($(xwininfo | grep -E "Absolute upper-left X|Absolute upper-left Y|Width|Height" | awk -F: '{print $2}' | tr -d ' ')) + +pos_x=$(( array[0] + 10 )) +pos_y=$(( array[1] + 10 )) +width=${array[2]} +height=${array[3]} + +ffmpeg -f x11grab -framerate 25 \ + -video_size ${width}x${height} -i +${pos_x},${pos_y} \ + $HOME/lib/videos/recordings/screencasts/$(date +%Y%m%d)-window-${1}.mp4