unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* guix open
@ 2022-11-18 19:49 jgart
  2022-11-18 19:51 ` (
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: jgart @ 2022-11-18 19:49 UTC (permalink / raw)
  To: Guix Devel

hi guixers,

what do you think of having a `guix open` command that opens the projects
home-page in your $BROWSER? 

For example, in case you want to specify the browser and override the default
$BROWSER (e.g. icecat):

guix open nnn --browser=chromium

bloat? 



;()


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 19:49 guix open jgart
@ 2022-11-18 19:51 ` (
  2022-11-18 19:58   ` jgart
  2022-11-18 20:22 ` Tobias Geerinckx-Rice
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: ( @ 2022-11-18 19:51 UTC (permalink / raw)
  To: jgart, Guix Devel

On Fri Nov 18, 2022 at 7:49 PM GMT, jgart wrote:
> guix open nnn --browser=chromium

I actually quite like this idea! I think maybe we could use something like
this instead for the command, though:

  guix home-page hello

    -- (


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 19:51 ` (
@ 2022-11-18 19:58   ` jgart
  2022-11-18 19:59     ` (
  0 siblings, 1 reply; 17+ messages in thread
From: jgart @ 2022-11-18 19:58 UTC (permalink / raw)
  To: (; +Cc: Guix Devel

On Fri, 18 Nov 2022 19:51:33 +0000 "(" <paren@disroot.org> wrote:
> this instead for the command, though:
> 
>   guix home-page hello

hi, thanks! I was just thinking of guix open like git open:

$ guix show git-open | awk 'FNR == 8 {print}'

homepage: https://github.com/paulirish/git-open

How would I do the above with recsel instead of awk?



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 19:58   ` jgart
@ 2022-11-18 19:59     ` (
  0 siblings, 0 replies; 17+ messages in thread
From: ( @ 2022-11-18 19:59 UTC (permalink / raw)
  To: jgart; +Cc: Guix Devel

Heya,

On Fri Nov 18, 2022 at 7:58 PM GMT, jgart wrote:
> How would I do the above with recsel instead of awk?

  guix show git-open | recsel -P homepage

    -- (


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 19:49 guix open jgart
  2022-11-18 19:51 ` (
@ 2022-11-18 20:22 ` Tobias Geerinckx-Rice
  2022-11-18 20:25   ` (
  2022-11-21 11:07   ` Ludovic Courtès
  2022-11-19 15:05 ` zimoun
  2022-11-20  7:45 ` Mekeor Melire
  3 siblings, 2 replies; 17+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-11-18 20:22 UTC (permalink / raw)
  To: jgart; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

jgart 写道:
> what do you think of having a `guix open` command that opens the 
> projects
> home-page in your $BROWSER? 

[…]

> bloat? 

Yes — as ‘guix open’ — but it would make a nice addition to ‘guix 
show’.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 20:22 ` Tobias Geerinckx-Rice
@ 2022-11-18 20:25   ` (
  2022-11-18 20:47     ` Tobias Geerinckx-Rice
  2022-11-19 15:03     ` zimoun
  2022-11-21 11:07   ` Ludovic Courtès
  1 sibling, 2 replies; 17+ messages in thread
From: ( @ 2022-11-18 20:25 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice, jgart; +Cc: guix-devel

On Fri Nov 18, 2022 at 8:22 PM GMT, Tobias Geerinckx-Rice wrote:
> Yes — as ‘guix open’ — but it would make a nice addition to ‘guix 
> show’.

How would that interact with ``guix package --show''? Perhaps it might
be better to add a ``guix package --open'' option?

    -- (


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 20:25   ` (
@ 2022-11-18 20:47     ` Tobias Geerinckx-Rice
  2022-11-19  0:40       ` jgart
  2022-11-19 15:03     ` zimoun
  1 sibling, 1 reply; 17+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-11-18 20:47 UTC (permalink / raw)
  To: (; +Cc: jgart, guix-devel

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

( 写道:
> How would that interact with ``guix package --show''? Perhaps it 
> might
> be better to add a ``guix package --open'' option?

Ah, damn, yes.  I didn't think of that.

(Actually, I think this nicely illustrates the folly of adding 
cute subcommands that should be options.  It illustrates this, er, 
~somehow!~, but it does.)

Yes, ‘guix package --open-home-page’, ‘--open-browser’, whatever, 
but again be a bit more descriptive.

(My bike shed alarm is now positively howling, but I feel like my 
unconditional support for the actual feature makes that almost 
OK?)

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 20:47     ` Tobias Geerinckx-Rice
@ 2022-11-19  0:40       ` jgart
  2022-11-19  8:54         ` (
  0 siblings, 1 reply; 17+ messages in thread
From: jgart @ 2022-11-19  0:40 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: (, guix-devel

On Fri, 18 Nov 2022 21:47:26 +0100 Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> (My bike shed alarm is now positively howling, but I feel like my 
> unconditional support for the actual feature makes that almost 
> OK?)

Not sure, but maybe we should also add a guix package --bike-shed-alarm, similar M-x doctor in GNU Emacs...

bloat?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-19  0:40       ` jgart
@ 2022-11-19  8:54         ` (
  2022-11-19 17:48           ` jgart
  0 siblings, 1 reply; 17+ messages in thread
From: ( @ 2022-11-19  8:54 UTC (permalink / raw)
  To: jgart, Tobias Geerinckx-Rice; +Cc: guix-devel

On Sat Nov 19, 2022 at 12:40 AM GMT, jgart wrote:
> Not sure, but maybe we should also add a guix package --bike-shed-alarm, similar M-x doctor in GNU Emacs...

What would that even do? :)

> bloat?

Yeah :)

    -- (


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 20:25   ` (
  2022-11-18 20:47     ` Tobias Geerinckx-Rice
@ 2022-11-19 15:03     ` zimoun
  1 sibling, 0 replies; 17+ messages in thread
From: zimoun @ 2022-11-19 15:03 UTC (permalink / raw)
  To: (, Tobias Geerinckx-Rice, jgart; +Cc: guix-devel

Hi,

On Fri, 18 Nov 2022 at 20:25, "(" <paren@disroot.org> wrote:
> On Fri Nov 18, 2022 at 8:22 PM GMT, Tobias Geerinckx-Rice wrote:
>> Yes — as ‘guix open’ — but it would make a nice addition to ‘guix 
>> show’.
>
> How would that interact with ``guix package --show''? Perhaps it might
> be better to add a ``guix package --open'' option?

Currently “guix show” is an alias of “guix package --show=” and we could
start to do the contrary, “guix package --show=” would be using “guix
show”.  Mainly for maintaining backward compatibility.  But “guix show”
could evolve this own way supporting options that would not be supported
by legacy “guix package --show=”.  WDYT?

It would avoid some headache. ;-)


Cheers,
simon


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 19:49 guix open jgart
  2022-11-18 19:51 ` (
  2022-11-18 20:22 ` Tobias Geerinckx-Rice
@ 2022-11-19 15:05 ` zimoun
  2022-11-20  7:45 ` Mekeor Melire
  3 siblings, 0 replies; 17+ messages in thread
From: zimoun @ 2022-11-19 15:05 UTC (permalink / raw)
  To: jgart, Guix Devel

Hi,

On Fri, 18 Nov 2022 at 13:49, jgart <jgart@dismail.de> wrote:

> what do you think of having a `guix open` command that opens the projects
> home-page in your $BROWSER? 

It is already possible, thanks Unix composability. :-)

   $BROWSER $(guix show hello | recsel -P homepage)

Well, ’recsel’ from the package recutils is unusual and appears a bit
weird at first but it is very powerful once RTFM. :-)


Cheers,
simon


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-19  8:54         ` (
@ 2022-11-19 17:48           ` jgart
  0 siblings, 0 replies; 17+ messages in thread
From: jgart @ 2022-11-19 17:48 UTC (permalink / raw)
  To: (; +Cc: Tobias Geerinckx-Rice, guix-devel

On Sat, 19 Nov 2022 08:54:42 +0000 "(" <paren@disroot.org> wrote:
> What would that even do? :)

Run `M-x doctor` in GNU Emacs

> > bloat?

Ya


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 19:49 guix open jgart
                   ` (2 preceding siblings ...)
  2022-11-19 15:05 ` zimoun
@ 2022-11-20  7:45 ` Mekeor Melire
  2022-11-20 14:31   ` jgart
  3 siblings, 1 reply; 17+ messages in thread
From: Mekeor Melire @ 2022-11-20  7:45 UTC (permalink / raw)
  To: jgart; +Cc: guix-devel

2022-11-18 / 13:49 / jgart@dismail.de:

> what do you think of having a `guix open` command that opens the projects
> home-page in your $BROWSER?
>
> For example, in case you want to specify the browser and override the default
> $BROWSER (e.g. icecat):
>
> guix open nnn --browser=chromium
>
> bloat?

what's the advantage over this one-liner?

    guix show recutils | recsel -P homepage | xargs xdg-open


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-20  7:45 ` Mekeor Melire
@ 2022-11-20 14:31   ` jgart
  0 siblings, 0 replies; 17+ messages in thread
From: jgart @ 2022-11-20 14:31 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: guix-devel

On Sun, 20 Nov 2022 07:45:31 +0000 Mekeor Melire <mekeor@posteo.de> wrote:

> what's the advantage over this one-liner?
> 
>     guix show recutils | recsel -P homepage | xargs xdg-open

too many characters to type but I think I will turn that one-liner into
a script, add it to my dots, and consider this feature completed ;()

Thanks for sharing!


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-18 20:22 ` Tobias Geerinckx-Rice
  2022-11-18 20:25   ` (
@ 2022-11-21 11:07   ` Ludovic Courtès
  2022-11-21 14:43     ` jgart
  1 sibling, 1 reply; 17+ messages in thread
From: Ludovic Courtès @ 2022-11-21 11:07 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: jgart, guix-devel

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> jgart 写道:
>> what do you think of having a `guix open` command that opens the
>> projects
>> home-page in your $BROWSER? 
>
> […]
>
>> bloat? 
>
> Yes — as ‘guix open’ — but it would make a nice addition to ‘guix
> show’.

‘guix show’ prints the home page URL, which is clickable in recent
terminal emulators.  Do we need something more?

Ludo’.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-21 11:07   ` Ludovic Courtès
@ 2022-11-21 14:43     ` jgart
  2022-11-21 15:45       ` John Kehayias
  0 siblings, 1 reply; 17+ messages in thread
From: jgart @ 2022-11-21 14:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Tobias Geerinckx-Rice, guix-devel

On Mon, 21 Nov 2022 12:07:32 +0100 Ludovic Courtès <ludo@gnu.org> wrote:
> ‘guix show’ prints the home page URL, which is clickable in recent
> terminal emulators.  Do we need something more?

Hi Ludo, what terminal emulator are using, kitty or alakitty?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: guix open
  2022-11-21 14:43     ` jgart
@ 2022-11-21 15:45       ` John Kehayias
  0 siblings, 0 replies; 17+ messages in thread
From: John Kehayias @ 2022-11-21 15:45 UTC (permalink / raw)
  To: jgart; +Cc: Ludovic Courtès, Tobias Geerinckx-Rice, guix-devel

On Mon, Nov 21, 2022 at 08:43 AM, jgart wrote:

> On Mon, 21 Nov 2022 12:07:32 +0100 Ludovic Courtès <ludo@gnu.org> wrote:
>> ‘guix show’ prints the home page URL, which is clickable in recent
>> terminal emulators.  Do we need something more?
>
> Hi Ludo, what terminal emulator are using, kitty or alakitty?

I am not Ludo (last I checked), but I use kitty and can click on links to open them in a browser. Even the "location" field will work, opening it from the store. I'm not sure what is set by default, perhaps ctrl+left click as that's what I have on one computer. While another I definitely changed it so it is just a regular left click.



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-11-21 15:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 19:49 guix open jgart
2022-11-18 19:51 ` (
2022-11-18 19:58   ` jgart
2022-11-18 19:59     ` (
2022-11-18 20:22 ` Tobias Geerinckx-Rice
2022-11-18 20:25   ` (
2022-11-18 20:47     ` Tobias Geerinckx-Rice
2022-11-19  0:40       ` jgart
2022-11-19  8:54         ` (
2022-11-19 17:48           ` jgart
2022-11-19 15:03     ` zimoun
2022-11-21 11:07   ` Ludovic Courtès
2022-11-21 14:43     ` jgart
2022-11-21 15:45       ` John Kehayias
2022-11-19 15:05 ` zimoun
2022-11-20  7:45 ` Mekeor Melire
2022-11-20 14:31   ` jgart

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).