From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Chris McGee In-Reply-To: <762ba12fb04afe6b6793ea4500590b4b@felloff.net> Date: Fri, 25 Nov 2016 23:23:04 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <2C6DF5C3-ED25-409B-B835-A07E4FCEBC20@gmail.com> References: <762ba12fb04afe6b6793ea4500590b4b@felloff.net> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] How to take a portion of a screenshot Topicbox-Message-UUID: af3c7e9a-ead9-11e9-9d60-3106f5b1d025 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_lenrek@felloff.net wrote: >=20 > 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: >=20 > term% a=3D() while(! ~ $#a 13){echo $#a $a; a=3D(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 >=20 > -- > cinap >=20