Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brow.sh support #23

Open
martin-braun opened this issue Jan 12, 2024 · 8 comments
Open

brow.sh support #23

martin-braun opened this issue Jan 12, 2024 · 8 comments

Comments

@martin-braun
Copy link

2 years ago you were interested into looking into this, so that you don't have to leave your terminal to browse the internet. I'd like to ask, if you are still interested in that or got any findings in this? This is a pleasing idea to me, but I'm not yet ready with brow.sh.

@lalitmee
Copy link
Owner

Hey @martin-braun, I don't understand what are you trying to say. Can you please be more specific?

@martin-braun
Copy link
Author

martin-braun commented Jan 13, 2024

@lalitmee Sure, I'm referring to the Reddit post, but let's not off-platforming. The idea is to combine browse.nvim with browsh, so instead of opening the browser after sending a search through telescope, it would open a new buffer and run browsh, so that you can actually turn NeoVim into a proper browser.

I'm thinking about trying to do this. I don't know what the best way would be. browsh and its Firefox backend need to run on the same machine afaik, so the NeoVim instance could also be running remotely, so that a terminal buffer that runs browsh would be sufficient enough.

But, I'm leaning more towards running NeoVim locally and then connecting via SSH and running browsh in each buffer instead, but I'm not certain if this is even a good idea. I still need to setup browsh.

For now, I just want to ask if you ever looked into this and can share some findings. Would you be interested in assisting to enhance your plugin to support browsh?

@lalitmee
Copy link
Owner

@martin-braun, got it. I remember someone asking about the support for browsh.

Actually I have never used browsh but I am open to explore and assisting to enhance browse.nvim to have the support for browsh.

What I can think right now is that we can create a separate module which can separately open browsh. But I am not sure how browsh works. I think you can drop some helpful links for me to read. And in the meanwhile if you are interested, you can start working on the initial POC.

Let's just check if we would be able to support this or not, I mean will it be feasible or not.

@martin-braun
Copy link
Author

@lalitmee Thanks, will definitely take a while because priorities. Before I can even come up with a POC, I need to see if browsh works for me. Also seeing if I can actually make it work in a buffer at all. I will get back to you in regards of this. :)

@lalitmee
Copy link
Owner

@martin-braun, sure. I understand.

I will also start looking into browsh.

@martin-braun
Copy link
Author

martin-braun commented Jan 17, 2024

browsh works, but it's very unstable (testing with Debian LXDE remote firefox via iTerm2 in macOS). It has a --startup-url which also functions as query parameter for the primary search engine, which will be handy for us. So things don't look bad at first glance.

However, I can't really use it in this state. No interest in using a mouse within a terminal, its keybindings are not customizable and vim motions are not yet a thing.

Definitely needs some treatment, before even thinking about this support in general.

But hey, look at that (yep, firefox within zsh within nvim within tmux):

image

Just run :terminal and entered ssh -t debdevx browsh --startup-url google.com (whereas debdevx is the alias of my remote machine that runs Firefox headless and has browsh installed).

Just can't really navigate. This is where vim mode would be necessary. There are also a bunch of other problems, like it has its own tab bar and you can't really start it another time in another buffer, because it will attempt to connect through the same port.

I still see potential to botch things together to get a proper browser in NeoVim. Imagine you can manage your bookmarks and open tabs in form of files (.url/.webloc) and you could use git to sync your bookmarks. On top of that, you can manage bookmarks in a folder structure, similarly how the Arc browser allows you to organize pinned tabs / bookmarks in their side bar. I am also interested in a concept in which open buffers persist themselves as files in the file system to maintain their state, like pinned tabs.

I want that, for any platform, in the terminal. It would improve privacy (your server won't reveal your location, you are your own VPN basically), pleasing your battery (websites are computed in the cloud) and you never have to leave your terminal, heck you could even go full TTY like that.

Fascinating stuff.

@lalitmee
Copy link
Owner

It's great. I will try to look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@lalitmee @martin-braun and others