From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4772 invoked from network); 5 Aug 2021 19:42:27 -0000 Received: from tb-ob1.topicbox.com (64.147.108.173) by inbox.vuxu.org with ESMTPUTF8; 5 Aug 2021 19:42:27 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob1.topicbox.com (Postfix) with ESMTP id E61C930E6C for ; Thu, 5 Aug 2021 15:42:25 -0400 (EDT) (envelope-from bounce.mM51c4690187627a0d4fc416e0.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id E2AD4306F8A1; Thu, 5 Aug 2021 15:42:25 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:date:from:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding:list-help :list-id:list-post:list-subscribe:reply-to:list-unsubscribe; s= sysmsg-1; t=1628192545; bh=XIWE5f1PUgoYbz8wEGkfDtl6fcLUW4Z9mlzXN rVn+ws=; b=Jo208weyu5BtYt0//tovx7wBazzDskzmW2QmWr4e3+hH/KS8TgQcW 6S5rMJNy+nLJCubxd7nTmm1PSSz4b0WqCQ4GgIO1BD+A+H6awgKQpBn3L0zGME+S yI+lI+SI/LAIotbd4AUfu+vx4MwGcRoAiVulm1j58YqWAzHyK1h4xo= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1628192545; b=ewpiig0YdI3k19GLKgARE+sj9Rj9Chx3rPGQ2FbuH1YoL+0ClO q0Uh1kFC5NDS4tHuEdSug2U+c4R0ONnvfAZ0ka9Ip75EZ7d0DwbnoojocnJLcmHv 7LUgFbgktyoChq7Zyvr5t9i+7d3hY3WUNQFHQXjdrmEI9pAccn+t8saO0= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; iprev=pass smtp.remote-ip=125.236.209.157 (asquith.prosimetrum.com); spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=asquith.prosimetrum.com policy.ptr=asquith.prosimetrum.com; x-return-mx=pass header.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-return-mx=pass smtp.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=message-id :date:from:to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:list-unsubscribe; s=dkim-1; bh=kvI8xgbz JDA730JM4BNyz4tGl5f/WjExXRSJlG3I8K4=; b=Nsa5Z5eWFmww3N/oxCpqXtE6 9CC+sl5gSKaWhGetGEccBT8qObqE920UP3BukqrC3dJY1TC03RcPSUbK7ENaupEr S+ddTnuA0eHykUw9/BDaQz1HIwFK3zfcq1zxKoQLF4zD17XBm13DyHYxMGevxmDN IoeP0127bfiJj5DLGUQ= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 95BF330E561E for <9fans@9fans.net>; Thu, 5 Aug 2021 15:42:11 -0400 (EDT) (envelope-from umbraticus@prosimetrum.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 38750114AEF; Thu, 5 Aug 2021 15:42:11 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1628192531; b=LPndGrnGeWf4kb90W2sxpNQ4O0jxH5lTv1GpaqjMQRGqR6FyZc gOWTZXfdhu1Uup/f8j2Murj107Qwyr68RvzCrzYGgclBC+PrP69+sqs+NSmvICrW 57z4lNfosj8Y40G+Gn6JybOmxVxcFQg8WjULOU1zGjDOxI8lHaY1A37o36Cvwec2 8V8fmphbBohQe6TVgv6zT4tvLh+NSHM3bDCgYnNrBP2x1uqZgPFaF9RJA2+CfmHB QhGIHRLU3DgNAYefJUHXdKT8tHTxnY+xwngJhnGo69K2XaYR1WPKhFv1H6IBjlzD MjkFh3rxyrjra6Y2FIY5Lj2OA5HRw8M2+UAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:date:from:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding; s=arcseal; t=1628192531; bh=o90pJ5jvPY2CbadqzyfDLDNYX0G3Udcv83IWGRsi1Zg=; b= QFZ9tKBQ1Twr0voiuPCVEn1AnxgjcL+hEKj1OHVykRvHY8taIBUYd9r2DddznQaU GDZvVl8SHhM11O6ir5VUBbVR9eoINAahp07FpxcMfxygY507p5AlXsCQv1vSG27R C20eXD2RcL02lMgdrKdC8EsSiE8NZuuqM6Korjb8Ppg1gxqlsny/pvjZzJgSNoUm PmK10/4i4ZX+xiB8B4cUAmLLpbQ0JlorKk2InwuPlLk2gL7rr+f/xlT/bouX6dv2 Ow00HwKd/nqtOEkc2nH0zX17CjdstZmL9TOTZqcIf7ek+hcEhNsA6f4Xk/xQQn9+ pAD6YMbjmj2CVIbLBausnA== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=prosimetrum.com; iprev=pass smtp.remote-ip=125.236.209.157 (asquith.prosimetrum.com); spf=pass smtp.mailfrom=umbraticus@prosimetrum.com smtp.helo=asquith.prosimetrum.com; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=asquith.prosimetrum.com policy.ptr=asquith.prosimetrum.com; x-return-mx=pass header.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-return-mx=pass smtp.domain=prosimetrum.com policy.is_org=yes (MX Records found: asquith.prosimetrum.com); x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvtddrieelgdejheculddtuddrgeduhedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghn shhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtne cunecujfgurhepkfffhffvufgjgggtgfesthejjedttddtvdenucfhrhhomhepuhhmsghr rghtihgtuhhssehprhhoshhimhgvthhruhhmrdgtohhmnecuggftrfgrthhtvghrnhepgf ejieegtedtveeglefgiefgtefhhfekhfejheevvdfgteehhfffffefledtjeefnecuffho mhgrihhnpehsrhdrhhhtpdhruhhnjhhimhhmhihruhhnrhhunhihohhufhhutghkvghrrh hunhdrtghomhdptggrthdqvhdrohhrghenucfkphepuddvhedrvdefiedrvddtledrudeh jeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdehrddvfe eirddvtdelrdduheejpdhhvghloheprghsqhhuihhthhdrphhrohhsihhmvghtrhhumhdr tghomhdpmhgrihhlfhhrohhmpeeouhhmsghrrghtihgtuhhssehprhhoshhimhgvthhruh hmrdgtohhmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (prosimetrum.com: 125.236.209.157 is authorized to use 'umbraticus@prosimetrum.com' in 'mfrom' identity (mechanism 'mx' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="umbraticus@prosimetrum.com"; helo=asquith.prosimetrum.com; client-ip=125.236.209.157 Received: from asquith.prosimetrum.com (asquith.prosimetrum.com [125.236.209.157]) by tb-mx1.topicbox.com (Postfix) with ESMTP for <9fans@9fans.net>; Thu, 5 Aug 2021 15:42:08 -0400 (EDT) (envelope-from umbraticus@prosimetrum.com) Message-ID: <674DE2214EA337146FCDA7D4674815E7@prosimetrum.com> Date: Fri, 06 Aug 2021 07:42:05 +1200 From: umbraticus@prosimetrum.com To: 9fans@9fans.net Subject: Re: [9fans] A few more questions about sam In-Reply-To: <16281799570.EA8Bba.31857@composer.9fans.topicbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 3ceb2acc-f625-11eb-a8bf-80f0be9bd3f5 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UMzEwN2NkM2JjNTM2ZGM2My1NNTFjNDY5MDE4NzYyN2EwZDRmYzQx?= =?UTF-8?B?NmUwPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M51c4690187627a0d4fc416e0:1:bxXCzXIWablCVGGl1X4VJpXVSNOVH69-R9u514a-jTo > Is there a way to customise the starting layout of sam? I have this patch, which changes the starting geometry of cmd window and opens files fullscreen immediately instead of having to sweep a rect: diff -u /sys/src/cmd/samterm/main.c ./main.c --- /sys/src/cmd/samterm/main.c Thu Apr 30 10:24:09 2020 +++ ./main.c Sat Jan 16 16:08:33 2021 @@ -43,7 +43,7 @@ scratch =3D alloc(100*RUNESIZE); nscralloc =3D 100; r =3D screen->r; - r.max.y =3D r.min.y+Dy(r)/5; + r.min.x =3D r.max.x-Dx(r)/4; flstart(screen->clipr); rinit(&cmd.rasp); flnew(&cmd.l[0], gettext, 1, &cmd); diff -u /sys/src/cmd/samterm/menu.c ./menu.c --- /sys/src/cmd/samterm/menu.c Wed Jan 18 13:12:54 2012 +++ ./menu.c Mon Jun 21 21:53:12 2021 @@ -205,7 +205,8 @@ Rectangle r; Text *t; =20 - if(getr(&r) && (t =3D malloc(sizeof(Text)))){ + r =3D screen->r; + if(t =3D malloc(sizeof(Text))){ memset((void*)t, 0, sizeof(Text)); current((Flayer *)0); flnew(&t->l[0], gettext, 0, (char *)t); kvik also has some window placement hacks: https://git.sr.ht/~kvik/ham There was a video demo somewhere. To understand sam's automatic window placement around the cmd window, resize cmd to a square in the centre and experiment with creating new windows by clicking in various regions around the square. There is afaik no way to save & reproduce window geometry; as mentioned above, I just open everything fullscreen. > http://runjimmyrunrunyoufuckerrun.com/rc/s I wrote this (improvements welcomed) but it relies on the ^ command and $% and $%dot variables which may not exist in your version of sam. I believe it was brought to your attention for these functions, which load a previous editing session: # ^d [file] # save unwritten changes and dump sam state to file fn d{ rfork e switch($#*){ case 0 dump =3D /tmp/sam.dump case 1 dump =3D $1 case * echo !u d exit } d =3D `{pwd} echo 'X/^''/w' echo !rm -f $dump echo 'Y/^..\./!echo `{cleanname -d' $d '$%}^'':#''^$%dot(2)^'',#''^= $%dot(3) >>' $dump echo 'X/^..\./!echo `{cleanname -d' $d '$%}^'':#''^$%dot(2)^'',#''^= $%dot(3) >>' $dump } # !l [file] # load dump file fn l{ switch($#*){ case 0 xargs -n1 plumb Can someone point me to a specific resource that explains > these expressions in more detail than does the sam man and > sam tut? http://sam.cat-v.org/ has a cheat sheet & some other resources. What is sam_tut.pdf missing that you would like to understand? umbraticus ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T3107cd3bc536dc63-M51c46= 90187627a0d4fc416e0 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription