7 ms·
Show HN: Glide, an extensible, keyboard-focused web browser
- shaneos 1y agoWhoa, so excited to try this out! As a regular Firefox user, does it pull over my settings?
- probablyrobert 1y agoCurrently the easiest way to pull over settings I'm aware of is to use Firefox Sync[0]. I haven't looked into other settings import solutions yet. [0]: https://www.firefox.com/en-GB/features/sync/ https://www.firefox.com/en-GB/features/sync/
- probablyrobert 1y agoAuthor here - happy to answer any questions :)
- dandersch 1y agoCan it provide vim keybindings and modes inside a textbox?
- probablyrobert 1y agoYes! All standard input elements have vim motions support but fair warning that a lot of the standard motions aren't implemented yet.
- Limero 1y agoIs it possible to automatically install extensions and set native Firefox configuration through the config? All my other programs are setup by just cloning my dotfiles and I really wish Firefox had that option.
- probablyrobert 1y agoYou can't configure extensions yet but you can set prefs! https://glide-browser.app/api#glide.prefs.set https://glide-browser.app/api#glide.prefs.set
- MarsIronPI 1y agoI've never managed to figure out how to configure extensions through the Firefox JS APIs, but installing an add-on using the internal APIs isn't too hard. I do it in my VimFX config.js[0]. Hope this is useful. 0: https://ba.ln.ea.cx/src/marsironpi/dotfiles/tree/common/.vimfx/config.js?id=95d7f9c741cadccb4c7005a1a18039452fd96e6d#n494 https://ba.ln.ea.cx/src/marsironpi/dotfiles/tree/common/.vim...
- probablyrobert 1y agooh that is very helpful, thanks for sharing :)
- MarsIronPI 1y agoNo problem, thanks for making Glide. I'm looking forward to trying it. Also, feel free to take inspiration from anything else you might stumble upon in my configs.
- MarsIronPI 1y agoI like the hints API, especially that it can hint on browser elements. However, power users may find it desirable to be able to use the hints system to select arbitrary kinds of elements. Perhaps you could extend the hint functionality to allow callers to pass a CSS selector that determines what elements get hinted? One use case is to write a command that lets the user choose an element and copy its text.
- probablyrobert 1y agoYou can use CSS selectors already! https://glide-browser.app/hints#excmds https://glide-browser.app/hints#excmds I've used it to add keymappings so that hints only apply to certain kinds of buttons on a page, e.g. https://github.com/RobertCraigie/dotfiles/blob/ecfd6f66e8a775c80849f7889f297ef99cea7997/glide/glide.ts#L70 https://github.com/RobertCraigie/dotfiles/blob/ecfd6f66e8a77...
- MarsIronPI 1y agoAh, I missed that option, sorry. I was looking at `glide.hints.show'. Are CSS selectors usable with that function? The documentation doesn't say so. Also, would you consider making it return a promise instead of taking a callback? I think that would be more ergonomic.
- probablyrobert 1y agoah yeah sorry about that, the API docs aren't quite complete yet. I'd recommend just looking at the glide.d.ts[0], it should be pretty readable (I hope). Yes the TS API supports it as well with the `selector` property: ``` glide.hints.show({ selector: "..." }); ``` > Also, would you consider making it return a promise instead of taking a callback? I think that would be more ergonomic. The reason it doesn't return a Promise directly is because the hints that are generated are not static, try scrolling while hints are active and you'll see them refresh. So the return type would have to be something else to work well with this functionality imo. [0]: https://github.com/glide-browser/glide/blob/8171c5c2af000b71e76b6b901a089b1a70eb8c3c/src/glide/browser/base/content/glide.d.ts#L379 https://github.com/glide-browser/glide/blob/8171c5c2af000b71...
- deleted 1y ago[deleted]
- dtj1123 1y agoThis looks awesome, great project! I'm wondering if the config is flexible enough to allow for setting up Helix/Kakoune style keybindings?
- probablyrobert 1y agoI'm not very familiar with Helix keybindings myself but if there are vim equivalents (and if they're actually implemented, a fair amount of mappings are missing right now) then you should be able to! There's a `motion` excmd you can use in your mappings. I don't think it'll be possible to implement multi-cursor support through the config though unfortunately.
- slightwinder 1y agoDoes this support DRM? Like playing Netflix and other commercial streaming-sites. I remember this being a big problem with Firefox-forks. What about Firefox Sync? Is RPC from external processes possible with this? For example, calling the URL of the open tab, or a list of open tabs and their URLs and/or content? Or remote control a tab, navigating to other URLs, etc? This would be interesting for integrating it with other apps and scripts, and Firefox is somewhat lacking in that field. How secure is this?
- probablyrobert 1y agoDRM is not possible to support unfortunately: https://glide-browser.app/faq#why-can't-i-play-drm-content https://glide-browser.app/faq#why-can't-i-play-drm-content Firefox Sync does work! RPC is not currently supported but I agree it would be pretty interesting, tweety[0] was recently shared with me and that looks like it'd be quite nice, although I haven't tried it yet. So far the only divergence from Firefox that could impact security is evaluating the config file, so I've described how that is sandboxed in the security[1] docs but I'm not super happy with the contents of that docs page; anything else you'd like to see mentioned? [0]: https://github.com/pomdtr/tweety https://github.com/pomdtr/tweety [1]: https://glide-browser.app/security https://glide-browser.app/security
- slightwinder 1y agoI've seen in the docs that the config does not support imports and also uses a special function for including config from other files. Will it stay this way? And does also prevent code from loading&eval via network? Maybe flesh this out more explicitly in the security-doc. It's not quite obvious from being in-between the docs. Also, what about 3rd-partys? Can other webextensions access glides functions? Or even worse, websites? I guess this is prevented by Firefox itself, but explaining this more explicitly might be also an enhancement for the security-doc.
- probablyrobert 1y agoI'm not entirely sure what is going to happen with imports to be honest. My current thinking is that they'll be supported eventually but that imported modules should not have access to glide APIs. For anything that does need to use glide APIs, I would support that through a separate API. Yes eval is blocked, and extensions / websites cannot access glide APIs. Thanks that is very helpful! Agree those things should be mentioned in the security doc.
- SwiftyBug 1y agoThis is my dream browser. Thank you so much for this!! I love that by default all inputs work in modal text editing. Do you plan on adding more complete Vim motions do that? For example, daw to delete the word, D to delete to the end of line, etc.
- probablyrobert 1y agoThank you! I just implemented the ones I use the most, e.g. diw, but the motions system is still in very early stages and there are lots of motions I haven't implemented yet. I do plan on implementing as many motions as is feasible, but there are some intentional differences, e.g. `f` is used for hints instead of jump-to-char.
- rattray 1y agois there a way others can contribute their favorite motions? like a link to the relevant bit of source that could be shared here?
- cosmic_cheese 1y agoWhile this isn't quite my cup of tea, it's nice to see Firefox being forked instead of Chromium. With this, there's now at least three significantly modified Firefox forks, alongside Zen and Floorp.
- hyperbolablabla 1y agoAnd Tor!
- user3939382 1y agoLibreWolf which should be the default
- sc68cal 1y agoI haven't looked at the source too deeply yet to investigate how you implement the fork, but you state that it's a fork of Firefox, how do you plan to integrate fixes from Firefox (security, etc)?
- probablyrobert 1y agoIt's implemented as a set of patches + new files for net new files I add myself, then to build it, the firefox source is downloaded and patched automatically - so bumping the underlying firefox version is generally very easy. I'm currently actually tracking the firefox beta channel because the frequent small updates are so easy to do.
- sc68cal 1y agogreat thanks
- dandersch 1y agoI've run into the restrictions regarding addons.mozilla.org myself using Vimium C, but it didn't happen often enough for me to consider switching my browser over it. I think I'd rather have something that makes my entire Linux desktop environment keyboard centric at that point, like homerow seems to do for macOS.
- asadm 1y agoPretty cool. I have been using Vimium[1] on Chrome which works ok. 1. https://chromewebstore.google.com/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb https://chromewebstore.google.com/detail/vimium/dbepggeogbai...
- MarsIronPI 1y agoDoes it work on chrome:// pages? That always bugged me about the Vimium Firefox port.
- leephillips 1y agoIt does not.
- 149765 1y agoVimium C has this option, you have to enable 'extensions-on-chrome-urls' flag.
- robotamerica 1y agofound this on your ʕ•ᴥ•ʔ Bear Blog. having fun with it. set it up like my zen browser (with the sidebar + pinned tabs) and testing it out for my productivity stack at work. I themed out the glide-hint css via userChrome.css to better match my aesthetics. keep up the great work, i will be keenly following along. 1. https://freeimage.host/i/KMQu3EQ https://freeimage.host/i/KMQu3EQ 2. https://freeimage.host/i/KMQAJ9t https://freeimage.host/i/KMQAJ9t
- probablyrobert 1y agoOh wow this is very cool, thank you for sharing!!
- robotamerica 1y agono worries, thanks to you!
- MarsIronPI 1y agoHow many tabs do you have open on average? Do you ever have trouble finding tabs with just being able to see the favicon?
- robotamerica 1y agoi typically have 5 tabs open, no more, no less. i always have them in the same order so that i can navigate via alt+1, alt+2, alt+3, etc.. one tab is always my personalised homescreen which has all the main links+software i use in a day. having them in the same order means i don't even need to look at the sidebar to navigate to them, it just helps to see what tab i am focused on sometimes. with glide you can also make keymaps: glide.keymaps.set("normal", "gd", () => openOrFocus("docs.google.com/document", "https://docs.google.com https://docs.google.com"), { description: "Go Docs" }); so i can close a tab quickly in normal mode using: tx. then hit gd to open google docs as an example. i do have a hidden bookmarks bar with a ton of junk and sites i rarely open, but it is there if i need to find something.
- 1y ago
- MarsIronPI 1y agoThis looks really cool! My current setup is Firefox with VimFX[0] and an elaborate config.js, but when the NixOS package gets merged I will definitely try it. For anyone wanting to stick to stock Firefox ESR, I highly recommend checking out VimFX. 0: https://github.com/akhodakivskiy/VimFx https://github.com/akhodakivskiy/VimFx The big downside of VimFX compared to Glide is lack of Firefox internal API documentation. I've had to dig through Firefox source code several times to find out how to do things e.g. wrangle tabs that would have been easy to do with the WebExtensions APIs. The fact that Glide makes these APIs available in the config file is the part I'm most excited about.
- MitPitt 1y agoCool. Currently on some websites I hit TAB until I reach the needed button/input. Try it right now on hacker news.
- TrevorFSmith 1y agoThat's a sweet idea and I'm glad to see your comment about maintaining it as a patch on top of Firefox sources so you can roll in their security fixes.
- vin92997 1y agoLooks very similar to Firefox with Tridactyl. The configuration with dotfiles is much nicer though.
- Oxodao 1y agoOmg the compact mode is there. Thank you for putting it back in. Nice to see Firefox forks too this is a really interesting concept, As a use-vim-everywhere kind of user, I absolutely need to try this out.
- Oxodao 1y agoOne thing that feels weird though is the fact that j/k movements are not smooth, is there any way to make them feel better (I might have just skipped that in the docs?)
- probablyrobert 1y agoAh not yet sadly - https://github.com/glide-browser/glide/discussions/3 https://github.com/glide-browser/glide/discussions/3 I personally prefer non-smooth scrolling as it feels faster.
- yoavm 1y agoGoing over the documentation, this looks like my dream browser. Firefox, full WebExt API, and can even run commands outside the browser. This is what Firefox Developer Edition should be like! Must try it out today.
- deleted 1y ago[deleted]
- Y_Y 1y ago> TL;DR: Glide is a Firefox fork with a TypeScript config that lets you build anything. Cool. My first thought was that this should be an extension, rather than a separate browser. Of course that's covered in TFA, modern extensions are just not allowed to have the necessary access. I get the "oh no security" arguments about letting random shit from Chrome Web Store have free reign over the browser, but what if I trust the extension publisher and am willing to assume responsibility for my own actions, data, and computer?
- stronglikedan 1y agoYour actions may be your own, but there is no modern ToS that implies your data or your computer are yours.
- john01dav 1y agoFOSS licenses imply that quite strongly, and quite a lot of software is under FOSS licenses