From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: <762ba12fb04afe6b6793ea4500590b4b@felloff.net> <2C6DF5C3-ED25-409B-B835-A07E4FCEBC20@gmail.com> In-Reply-To: <2C6DF5C3-ED25-409B-B835-A07E4FCEBC20@gmail.com> From: Skip Tavakkolian Date: Sat, 26 Nov 2016 07:27:37 +0000 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=001a11438cfaf00cfe05422f2c10 Subject: Re: [9fans] How to take a portion of a screenshot Topicbox-Message-UUID: af406384-ead9-11e9-9d60-3106f5b1d025 --001a11438cfaf00cfe05422f2c10 Content-Type: text/plain; charset=UTF-8 Nice. Looking at jpg(1) sources, it's not obvious where the allocation limit comes in. Too bad there isn't an encoder for vp8. for mouse position, you may need to write a shim to snoop on the mouse; something like this: https://github.com/9nut/plan9/tree/master/tippy On Fri, Nov 25, 2016 at 8:23 PM Chris McGee wrote: > 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: > > > > 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 > > > > > --001a11438cfaf00cfe05422f2c10 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Nice. Looking at jpg(1) sources, it's not obvious wher= e the allocation limit comes in. Too bad there isn't an encoder for vp8= .

for mouse position, you may need to write a shim to sn= oop on the mouse; something like this:
https://github.com/9nut/plan9/tree/master= /tippy



On Fri, Nov 25, 2016 at 8:23 PM Chris McGee <newton688@gmail.com> wrote:
=
Thanks Skip, Cinap,

This command seems to be working quite nicely (except for the memory alloca= tion 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 /t= mp/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 wa= it 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= :
>
> 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=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
>
> --
> cinap
>


--001a11438cfaf00cfe05422f2c10--