Closed danbush closed 5 months ago
Hey @danbush, are you using a custom config.opener? If so could you share the config, I feel like it's probably an edge case using lynx.
Also try running nom with -v
and see if that logs any additional errors out.
I originally didn't use a custom config opener but now i have this
openers:
- regex: ".*"
cmd: "lynx %s"
re -v
no extra output happened for opening unfortunately. I recognize this is just an edge case probably, although being able to use in-terminal browsers would be a nice to have feature in the future.
Hmm. It's been several years since I used a terminal browser so hadn't even crossed my mind when implementing the openers.
In theory it should work if you were to so something like alacritty -H -e "lynx %s"
to open a new alacritty (other terminals available) with the lynx browser pointing to the link.
I feel as though this is not a super nice workflow and maybe it would be cool to open it within the current terminal instance but would be interested to hear your thoughts about how you expected/would like it to work or how other similar apps integrate with lynx.
Yeah your idea of it opening within current terminal instance is what I hoped for.
For some context I'm currently working on building a little mini laptop that would be entirely keyboard driven (take a look at https://penkesu.computer which is my inspiration) and I'm thinking of not even installing a gui at all. So having something like nom as a part of that device feels like a great fit.
I recently built myself a little mini terminal program that pulls the top results of a search from a kiwix-serve instance of an offline version of wikipedia, and then once you select it opens the (locally hosted) wiki page of that item in lynx within the same terminal. I know that's probably a tangent but thought it was a somewhat relevant example.
The part thats weird here is that I have set my system up such that if I directly call xdg-open
to open a url it will correctly open lynx, so I'm not sure why nom's implementation wouldn't automatically work.
@danbush this is implemented in https://github.com/guyfedwards/nom/releases/tag/v2.5.0, thanks for the report and let me know if you have any further issues. (I tested with lynx 2.9.2 on arch linux in alacritty)
Just tested and it works perfectly, thank you!
I've been having trouble getting nom's "open in browser" to work. To be fair, I am doing something I think out of the ordinary, in that i'm trying to get it to launch lynx in terminal rather than a desktop app, but the bug I'm actually reporting is that when I hit 'o' in nom, it drops out of app, but just goes back to a blank command line without any error output, so I'm having trouble figuring out which part of the chain is going wrong, whether its nom missing something, myself missing something, or perhaps just a fat finger in some config I have somewhere.