From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [168.235.81.73]) by inbox.vuxu.org (Postfix) with ESMTP id D417029363 for ; Sat, 1 Jun 2024 14:32:33 +0200 (CEST) Received: from wopr.sciops.net ([216.126.196.60]) by 9front; Sat Jun 1 08:30:21 -0400 2024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sciops.net; s=20210706; t=1717244971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=MAZEwjM232yYyPVrrrS3EL8DDv3NlNRmLdMo6EurNLk=; b=YQSrBBhId0ipWazmJyNBXIviA4OOo23gLlWDcRhSzlCVQDVCIEd2qKpE7WgA6LQ36K5swR dRyVY/62APYe+oT6hpx8VbD18QyP7eeHWTGWi1xTd5sv8A10MZqN6i1lGZ2O6YxzBmYOkF TGq7cLxJzDSBMrzYy99RFGJyWCvJur0= Received: by wopr.sciops.net (OpenSMTPD) with ESMTPSA id 3c43ae52 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO) for <9front@9front.org>; Sat, 1 Jun 2024 05:29:30 -0700 (PDT) Message-ID: <276E414CB17EF600E7AD119C8CF3AF3A@wopr.sciops.net> Date: Sat, 01 Jun 2024 14:30:15 +0200 From: qwx@sciops.net To: 9front@9front.org In-Reply-To: <7335757DA3222A181B6A8E6C78515DD2@prosimetrum.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: self-signing map/reduce strategy firewall Subject: Re: [9front] sam menu command patch Reply-To: 9front@9front.org Precedence: bulk On Sat Jun 1 13:43:46 +0200 2024, umbraticus@prosimetrum.com wrote: > Others may find this useful; allows adding commands to sam's b2 menu. > Rather than some kind of polling watch script, I prefer something like > ^echo w; window 'mk && 6.out' > from within sam; this makes such workflows even more convenient. > You can combine with ^mysaminit and load all your favourite > commands into the menu on startup. Fuck yes. Let's merge it. I don't think this mail alone does the patch justice. Here are two examples of a collection of samscripts one can preload: http://runjimmyrunrunyoufuckerrun.com/rc/s http://shithub.us/qwx/rc/HEAD/bin/s/f.html To load these, you do ^s in sam, and they are now usable within it. Check out the u script in either file: !u starts a new rio window showing the description of these and their usage (from my own script): ^r [cmd] # run command in cwd and send output to jam.err window ^R [cmd] # run command and send output to jam.err window ^T # write to disk any modified files !o name expr # save a sam command ^O expr # run any rc function ^w [cmd] # open window in cwd ^W [cmd] # open window in current file's directory ^dump # print all files in menu !u [fn...] # print sam fn usage ^+ [n] # increase indent ^- [n] # decrease indent [etc.] What this patch does is allow you in addition to add these to your mb2 mouse menu. For example, my s script sources a file in my $home/lib directory that looks like this: cat <