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=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, NICE_REPLY_A,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 24831 invoked from network); 24 Aug 2022 13:39:56 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 24 Aug 2022 13:39:56 -0000 Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Wed Aug 24 09:38:30 -0400 2022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1661348306; 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:references:references; bh=1zilsB1qCdONaoUg5QoEAM9AQhKFya7WRDi5pJ/oSJQ=; b=M2lqRNaSCgL+aqeq7UPcroc+GhdYgPXcGV6yP8ai/mzFtLYYIJpN8UEK7VHruoeVoAes5j /4C+xXzVkHTQFGqlgDe9Hwd2sA/4Iup9uJwJ8sbsg523YEAgrwCLY7N49Yy6zoy5a3vM+A ryDAF9h4s6nGHtR6e74GrRzqtluPfFI= Received: from [192.168.168.200] (161-97-228-135.mynextlight.net [161.97.228.135]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id 3b937b7d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Wed, 24 Aug 2022 08:38:26 -0500 (CDT) Message-ID: Date: Wed, 24 Aug 2022 07:38:23 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-US To: 9front@9front.org References: <631466AA07BC8296AF8BDD0EBF0627FD@wopr.sciops.net> From: Jacob Moody In-Reply-To: <631466AA07BC8296AF8BDD0EBF0627FD@wopr.sciops.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: virtual metadata JSON property cache Subject: Re: [9front] [PATCH] programmable menus for rio Reply-To: 9front@9front.org Precedence: bulk On 8/24/22 01:05, qwx@sciops.net wrote: > On Wed Aug 24 07:01:48 +0200 2022, moody@mail.posixcafe.org wrote: >> On 8/23/22 20:46, ori@eigenstate.org wrote: >>> Quoth Jacob Moody : >>>> Something I've been playing with is a way of exposing part of the rio >>>> menu to the programs running within it. This is a bit of a simple >>>> approach, but I would like to gauge interest that people have in >>>> something along these lines before continuing. >>>> >>>> This adds a /dev/menu file that can be written to >>>> to add new entries to the button3menu. The file >>>> can be read to get the text string of an added >>>> menu entry when hit by the user. >>>> >>>> Thanks, >>>> moody >>>> >>> >>> It seems like an interesting trick -- but, the >>> programs that might use it would already likely >>> be graphical, no? >>> >> >> Switching languages via special character in ktrans >> doesn't feel quite right to me. I wanted a graphical >> way of switching them, and it seemed like something >> I wanted on the rio menu. > > This is interesting. umbraticus and I experimented with adding menu2 > entries in sam for commands we use all of the time. Initially I tried > doing this with menu entries for adding/removing items, but it was > horrible. umbraticus proposed defining a new sam command `M' which > adds or removes a menu entry: as an example, `M ^R mk install' would > add `^R mk install' verbatim to the menu (R being some sam script), > and sending this again would remove it. We both have scripts which > define a bunch of rc functions to use within sam, which also works for > adding stuff at the start of a session. Then, while using sam, one > can add or remove commands one ends up using a whole bunch during a > session instead of switching to the command menu, finding, selecting > and sending them, which happens way too often for me (for example, > things like `|fmt -l 80', `|cmd |awk ...' or `!window -m -cd ... > cmd', etc.). This works very nicely in my case. > I would 100% be behind bringing this sam work upstream. That is quite neat. > For rio, it's a bit different, and I don't know how it would work out > or what the best interface would be, but I think it's worth > discussing. Yeah I'm not sure what the right solution here, I'm just throwing out code to start the conversation. - moody