Thanks Skip, Cinap,

This command seems to be working quite nicely (except for the memory allocation 
problem in gif(1) for larger recordings):

for (i in `{seq -w 1 25}) { sleep 0.01; cat /dev/screen > /tmp/screen-$i.img }; 
togif -l -1 -d 300 /tmp/screen-*.img > /tmp/recording.gif; rm 
/tmp/screen-*.img; echo Done

It would be easy enough to introduce a crop to restrict the recording to a 
particular window or area of the screen.

Is there a way to capture the current mouse position without blocking to wait 
on an event from /dev/mouse? I was thinking that it would be interesting to 
crop around the current mouse position.

Chris


> On Nov 24, 2016, at 3:56 AM, cinap_len...@felloff.net wrote:
> 
> rc variables are lists, and $#var evalulates to the
> length of the list... you can use that to make counters
> by concatenating elements to a list:
> 
> term% a=() while(! ~ $#a 13){echo $#a $a; a=(1 $a);}
> 0
> 1 1
> 2 1 1
> 3 1 1 1
> 4 1 1 1 1
> 5 1 1 1 1 1
> 6 1 1 1 1 1 1
> 7 1 1 1 1 1 1 1
> 8 1 1 1 1 1 1 1 1
> 9 1 1 1 1 1 1 1 1 1
> 10 1 1 1 1 1 1 1 1 1 1
> 11 1 1 1 1 1 1 1 1 1 1 1
> 12 1 1 1 1 1 1 1 1 1 1 1 1
> 
> --
> cinap
> 


Reply via email to