gomuks icon indicating copy to clipboard operation
gomuks copied to clipboard

[Feature Request] Create a plumber setting instead of hard-coding xdg-open

Open AlexBocken opened this issue 1 year ago • 5 comments

Personally I've always been a large fan of using rifle instead of xdg-open when possible. Could maybe a setting be implemented where one could set the plumber instead of xdg-open being hard-coded?

Maybe I can take a look and patch together a PR in the coming day if it is wanted.

AlexBocken avatar Jul 13 '23 11:07 AlexBocken

Woo i love this and it pertains to what i'm still planning to finish in #422 😎

Another launcher that might be worth thinking about (if we wanted to generalize) is https://github.com/chmln/handlr which I've been meaning to give a serious try 🏄🏼

goodboy avatar Jul 13 '23 15:07 goodboy

Is that what your last point in the original comment of #422 pertains to? (Btw, really looking forward to that one being merged)

it'd be suuuper slick if we could use ranger for opening media files as well - eg. when clicking an inline image?

I wasn't sure whether that's the same idea. I must admit I'm not too familiar with the code base and/or Go, so if you think it's quick for you to implement and are open to do it please go ahead. The basic idea is just to replace "xdg-open" in

https://github.com/tulir/gomuks/blob/09a927955810f6f0c6d3f4809d9b01eda365fd39/lib/open/open_xdg.go#L5C1-L5C27

WIth a user-settable string.

AlexBocken avatar Jul 13 '23 16:07 AlexBocken

(Btw, really looking forward to that one being merged)

Yeah, sorry just been totally derailed by a new distro and how to get stuff working and setup for dev in golang again. I'm definitely looking forward to it too 😂

I wasn't sure whether that's the same idea. I must admit I'm not too familiar with the code base and/or Go, so if you think it's quick for you to implement and are open to do it please go ahead.

I just think it's somewhat related in the sense that choosing a program for file-dialogs is more or less related to xdg-open portals (at least afaiu) and thus i think what you're more or less asking for is pluggable xdg-portal backends?


I have the following resources on my learning list for all this:

  • https://wiki.archlinux.org/title/XDG_Desktop_Portal
  • https://flatpak.github.io/xdg-desktop-portal/#idm9
  • https://github.com/flatpak/xdg-desktop-portal/issues/680

goodboy avatar Jul 13 '23 16:07 goodboy

@AlexBocken oh also not sure if you're in the matrix room but we can discuss in their as well if you want 😉

goodboy avatar Jul 13 '23 16:07 goodboy

Hello! This feature would be especially amazing for macOS users, since we have open here, and open cannot recognize file headers, only file extensions, so by default it tries to open everything in some default text editor, that I didn't even know existed. (That could be a separate issue to append a proper file extension to the temporary files' names.) Also I believe open will never support to open a file in the same terminal, and wait for its completion, which also would be amazing for opening files in terminal tools.

(I miss Linux so much 😢)

TamasBarta avatar Jan 20 '24 17:01 TamasBarta