sonnyp / Junction

Application/browser chooser
https://flathub.org/apps/re.sonny.Junction
GNU General Public License v3.0
458 stars 29 forks source link

Remember for domain / file type #5

Open sonnyp opened 2 years ago

sonnyp commented 2 years ago

User should be able to remember the application by type (for file) and domain / public suffix for urls

For file type we can simply set the selected application as the new default application.

For urls we will need to store a list somewhere. If it's a simple text file I guess Junction doesn't have to offer a UI even thought that'd be best.

Anyway, the problem is where to put that "Remember" feature.

WIP

junction-remember

Not very happy with the header bar, it feels a bit intrusive compared to this design

Screenshot from 2021-10-19 22-12-01

sonnyp commented 2 years ago

Maybe the remember button could be visible only when the window is hovered.

Maybe the headerbar even. EDIT: Apostrophe does this when you start typing, the header bar fades away.

Similar to https://developer.gnome.org/hig/patterns/controls/overlaid.html

in some cases it is desirable to have semi-transparent controls which appear over window content.

drod3763 commented 2 years ago

There is a feature in OpenIn, a similar program for mac that has a settings window where you can set Rules to do things like that using wildcards or regex. Additionally there is a useful option that lets you sets a default - like firefox/chrome, and sets the other browsers only to show up when a hotkey is pressed or a rule is written. So maybe it could be part of a settings file or a separate app that lets you configure it rather than a dropdown.

sonnyp commented 2 years ago

OpenIn GUI is way too complicated/cluttered.

I'd rather offer a dropdown similar to :point_up: for simple use cases - easy to use and discover.

And https://github.com/sonnyp/Junction/pull/16 for advanced users.

rohmishra commented 2 years ago

Maybe the flow could go user selects an icon before selecting their choice of app > user selects the app > instead of just opening the app, Junction also asks the scope for default: for all links, for this website or just for this link?

That or it could go in the three dot menu on bottom right.

sonnyp commented 2 years ago

@rohmishra I don't understand - please rephrase.

rohmishra commented 2 years ago

so in this screenshot below, you can see the three dot menu, would it be a better option to add "always use selected app" option in that menu? Could also be a radio button for "for just this link" "for abc.xyz" and "for all links/files like this" image

rohmishra commented 2 years ago

I'm working on a potential PR for #12 / #29 and I think we could "kill two birds with one stone" to speak with this feature being taken in consideration for default selection. What do you think? Would that be a good idea? Would need a bit of work to support specific domains too but certainly doable.

sonnyp commented 2 years ago

I don't understand how #12 and #29 are related to this or how what we talked about would solve #5 at the same time.

rohmishra commented 2 years ago

What I mean is we can store the url for each domain instead of just protocol.

That would also mean it would be a all or nothing affair though.

sonnyp commented 2 years ago

I think it's too early to bake that in. 'Remember for url' needs more design/thoughts and to be implemented before it makes sense to take it into considerations.

Let's start with MimeType - it's easy enough to build upon #12 / #29 later.

johnnyasantoss commented 2 years ago

What if the dropdown would be in the same text field as the url on the bottom? Like so: image And when clicked it would show the "Remember domain: github.com", "Remember prefix: github.com/something/", etc.

theotheroracle commented 2 years ago

that seems like a fairly elegant way to do that

pdecat commented 9 months ago

It would be awesome to go as far as https://github.com/blipk/bowser-gnome, and allow specifying rules based on all URI parts, e.g.:

image

Mart-Bogdan commented 3 months ago

There is Windows app BrowserPicker and it allow to write rules by regex https://github.com/mortenn/BrowserPicker?tab=readme-ov-file#match-types