will-stone / browserosaurus Goto Github PK
View Code? Open in Web Editor NEWThe browser prompter for macOS
Home Page: https://browserosaurus.com
License: GNU General Public License v3.0
The browser prompter for macOS
Home Page: https://browserosaurus.com
License: GNU General Public License v3.0
This seems to be the same bug that's affecting my other Electron app (will-stone/SpotSpot#24). When clicking an activity to open a URL with, the app is brought to the front (if running) but the new tab takes a second or two to open. This only started happening since upgrading to Mojave (boo!). Also, this only happens on the built version of B; when run in dev mode (yarn start
), B behaves the same as it always did.
If anyone stumbles across this and knows the fix, please let me know! This affects both my home and work macs, therefore it's definitely an issue caused by Mojave (please no "me too" posts).
I'd like to experiment with upgrading Electron however this app uses Electron-Forge and it doesn't look like they are keeping v5 up-to-date with the latest Electron; it currently uses v1.8. They do have a v6 which uses Electron v3 but v6 of Electron-Forge is in beta and is plastered with notices of instability. I tried copying over my src
dir to a brand new v6 Electron-Forge but it didn't work. Therefore, my plan is to start a v6 Electron-Forge and essentially start again, moving items over bit-by-bit. This can also be my opportunity to move over to TS. Unless... someone knows what the issue is and knows a fix.
The matcher I use to see if any of the whitelisted apps are installed is matching against the word "safari" and not the whole phrase "Safari Technology Preview".
First of all, thanks for putting together this tool, it is extremely useful!
I'd like to explore an optional feature to allow listing all available Chrome profiles so that you can choose which profile you'd like to open the link with.
I'm filing this as a feature request to ask for comments and keep track of the efforts before the PR.
Prefs window currently behaves like the picker window: no dock icon, always on top etc.
Turn it into a normal window. Maybe keep close = hide behaviour though, as means it'll show quickly on subsequent opens and won't require the renderer to ask for the browsers again.
When I click on the app icon in menubar, there is only "About" and "Quit".
There can be "Preferences" or "List of Browsers" or "Application Folders".
I've been using browserosaurus for a while and yesterday after a reboot, it stopped proposing firefox nightly.
I'm still on macos sierra (10.12.6). Let me know if I can provide more information
Is it possible to add some external script execution with parameters before showing browser chooser window?
I want to implement my own logic so no need to choose browser in menu on every click and do some url rewrites if needed. For example, i want to open links with domain.tld belonging to my work in one browser, other links โ in another. Or i want to remove some tracking links from url with my code and return cleaned url.
Wrapper script should have input parameters(json?):
and return:
Not sure if it's hard to implement. I think it should be nearly easy task. Thanks in advance.
This is a thing I started implemeting yersterday (for personal use).
It works like this:
the app look for something like ~/.browserosaurus.json
or ~/.browserosaurus/conf.json
at startup time and, if it finds it merges it with the default behavior.
If this is the default:
[
{ name: 'Brave', key: 'b' },
{ name: 'Chromium', key: 'c' },
{ name: 'Firefox', key: 'f' },
{
name: 'FirefoxDeveloperEdition',
alias: 'Firefox Developer Edition',
key: 'd'
},
{ name: 'FirefoxNightly', alias: 'Nightly', key: 'n' },
{ name: 'Google Chrome', key: 'g' },
{ name: 'Google Chrome Canary', key: 'y' },
{ name: 'Iridium', key: 'i' },
{ name: 'Maxthon', key: 'm' },
{ name: 'Min', key: '-' },
{ name: 'Opera', key: 'o' },
{ name: 'Safari', key: 's' },
{ name: 'TorBrowser', key: 't' },
{ name: 'Vivaldi', key: 'v' }
]
and my handcrafted dotfile is:
[
{ name: 'Firefox', key: 'v' },
{ name: 'Google Chrome', key: 'g' }
]
than the final object that will be rendered is:
[
{ name: 'Firefox', key: 'v' },
{ name: 'Google Chrome', key: 'g' },
{ name: 'Brave', key: 'b' },
{ name: 'Chromium', key: 'c' },
{
name: 'FirefoxDeveloperEdition',
alias: 'Firefox Developer Edition',
key: 'd'
},
{ name: 'FirefoxNightly', alias: 'Nightly', key: 'n' },
{ name: 'Google Chrome Canary', key: 'y' },
{ name: 'Iridium', key: 'i' },
{ name: 'Maxthon', key: 'm' },
{ name: 'Min', key: '-' },
{ name: 'Opera', key: 'o' },
{ name: 'Safari', key: 's' },
{ name: 'TorBrowser', key: 't' },
{ name: 'Vivaldi', key: null }
]
It basically override order and keys.
Firefox now has a new icon
So how can I open it's preferences?
Or for closing it, I need to use "Activity Monitor.app".
And there can be an autoupdate feature in preferences, which is another issue to be opened. Should I?
Might be easiest to change prefs window to a table, then GUI items will be more obvious. Columns: browser, enabled, key, default (maybe with an "i" icon that when hovered, explains that it allows this browser to be opened on enter key).
As the activities in the picker no longer use Blueprint's Menu component, the focus rings need to be remove manually.
This piece of code introduces an arbitrary timeout before opening the link when selecting a browser with the keyboard. Is there a way to make that optional? It really adds a feeling of slowness and I don't really care for the application to give me feedback on which browser I chose when said browser will open anyway.
I'd just open a PR to remove the timeout, but I'm guessing it's there for a reason and I'm not comfortable enough with react/electron to add an option.
browserosaurus/src/picker/app/activity/activity.container.js
Lines 27 to 30 in 82b505d
Firstly, great app, I really like it and it works well!
Firefox isn't in the list of browsers
On my home-machine I see all my browsers available in the settings under 'activities', including Firefox.
On my work-machine I don't see firefox, I am guessing this is due to the fact that I have more browsers on my work-machine so that firefox is left out? No idea if I am thinking in the right direction.
I attached a screenshot of the settings screen and my apps
Rescanning doesn't fix the issue btw
In order to permit an easier grow of the user community for the app, and allow a more stream lined conversation model I would suggest to create a community on Gitter..
It's rich of slack-like features, has a small learning curve and just need a github account.
The main advantage is for people who want to ask questions without the need to open/close new issue, or the hassle of asking for the permission to open new issues on already opened and unrelated issues.
If a browser is removed or added. Add a button in preferences that can rescan the system.
This should be fairly straight forward with all the functionality already build and in its own function. Simply need to send event to main.js to trigger rescan.
Hello,
I'm thinking an other way to find browsers on the machine...
Checking apps which are registered to handle protocols (http/https/sockets), we should find the same apps as this :
I'm thinking about doing an external repo.
As browserosaurus use opn
for opening, it could use an external lib to find appsByProtocols.
For the moment, I don't really now how to do it on osx, but I know it is possible, as other software did the same : http://www.rubicode.com/Software/RCDefaultApp/
Bonus is that it could extend browserosaurus compatibility to windows & linux.
Tell me your thoughts, I'll probably investigate more next week for the OSX part.
For milliseconds, the previously used URL is shown at the top before the new URL populates.
@Jackymancs4 I've started off the sorting functionality. For some reason I can't get it to save down into the store, or persist in any way. Do you mind taking a look? https://github.com/will-stone/browserosaurus/tree/sortable
Following on from #44, maybe there could be some sort of rudimentary plugin system. Thoughts:
Other than for copy-to-clipboard, what else could be a plugin? Maybe each browser entry could be a plugin to start this off?
Hi!
Since today it opens only a new blank window.
New input field in preferences window. Thoughts:
v3 has just come out. Upgrade and see if it breaks anything.
Hi, thanks for this great tool!
I have a suggestion, it's not very important, but could be a nice implementation: a customized order of the different browsers. Let's say: the user could decide, which browser is in which order, maybe with drag&drop or so.
The build size seems to be creeping up. Look to see if there's any unused JS being bundled. Or maybe look to shrink/optimise the images (currently using very high-res logos). etc.
Sometimes I feel B doesn't give the impression that it's over all other windows and requires action. Try adding window shadow back. Opening animation will have to change. Experiment.
The whitelist of apps is getting rather large now. If a user had all the browsers installed and a small screen, the list wouldn't fit. We're gonna need the preferences pane to scroll, or make the icons and spacing smaller, which is probably the easiest quick-fix.
v4 has a couple of new features, most notably is where the Window opens. Therefore, a new video for the website would be good.
I thought I'd fixed this but obviously not. Last time I just put a setTimeout around this: https://github.com/will-stone/browserosaurus/blob/master/src/renderers/utils/UrlListener.js#L28. I'll try that again.
With the app closed, if I open more than one link before it's ready
it throw an error alert and then randomly close the main process or keep running without responding in background.
I would expect the app to show the last clicked link when ready.
Change renderers into mini React apps. This will allow easier adding of new features. Also, update the browser retrieval process so that renderers ask for the info rather than wait for it to be sent on app load.
I can't find safari to open my link
If I git clean -fdx && yarn install && yarn start
(skipping the yarn build-css
step) I get the following:
If I include the yarn build-css
step, I get the following:
The context menu popup is also blank when I click on a link (presumably because the functionality to scan system browsers hasn't been run) :
This is the first time I've ever used Electron so I appologise that I can't offer much more in the way of info.
I also had to run the following steps to create a build (yarn run make
) (from history file, not necessarily in order) :
yarn install
yarn build-css
brew upgrade
yarn build-css
npm rebuild node-sass
yarn build-css
yarn test
yarn build-css
npm update electron --save
yarn install
Instead of always choosing which browser to use, would it be possible to add support of custom rules? Such as "if link is launching from HipChat (or any other application) then launch in Chrome (or whatever browser you choose)".
Current version 0.11.0 of xml2json uses a version of moment.js that has a security flaw. The maintainer of xml2json has merged the fix but am awaiting release.
Current thinking: another entry in the list (at bottom?) that can be clicked and has a keyboard shortcut to copy clicked URL to keyboard.
Actually, browserosaurus's pickerWindow appears on main screen.
I think it should appear in the screen where the cursor is.
Thank you for this very useful app. I've been using it for a few days (a build from the v4 version) and I absolutely love it!
A popular macOS Twitter app (Tweetbot) has a very useful setting: "Open links in background". This will prevent the OS from shifting focus to the browser when clicking a link. I find this behaviour to be very useful when I have Tweetbot open in fullscreen mode and want to open several links for reading. I click them all and then move to my browser to read them.
Right now with browserosaurus this behaviour is no longer possible. My suggestion is to add a key modifier to open links in the background (for example the alt
key). When the user is holding down the alt
key and selects the browser, the link is opened in that browser in the background and the focus remains on the original app.
I don't have any experience with Electron/React yet so I'm not sure if this is even possible.
This way is faster to install/substitute new versions of the app, and it's also an habit i saw for most of mac apps. Certainly an habit of mine xD
It's also a good excuse to rollout a lighter 1.0.5 release ( #9 )
If the picker window is dismissed, it doesn't seem to give back focus. e.g.
Investigate using app.hide() instead of browserWindow.hide()
Your last build is more than double the size of the previous one.
Looking inside the package I found that all the devDependencies where included (the most weight regarding babel). An unexpected behavior for electron-forge.
I'm also not been able to replicate it (all my builds in develpment evironments where >150MB).
The only thing I know that behave like this is the --no-prune flag on electron-packager.
Maybe some hidden environment configuration on your system?
Not a real problem to me. Just a note on that ;)
This would help with the timeout hacks currently in place after selecting an activity.
It would be great to support opening URL in Safari Technology Preview.
I'm happy to give a shot to a PR if you're busy. A quick skim suggests I'll just need to add the browser to activities.js.
Thank you for open sourcing the project @will-stone. It makes my daily life much easier.
I just found out about Browserosaurus because I was looking for an alternative to Choosy. Your solution seems to be a lot better but it can't detect Firefox Dev Edition.
I'm looking forward for Browserosaurus to detect it ! ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.