Closed david-tejada closed 9 months ago
Having this command be available globally is more difficult than expected. There is no easy way to switch to a given browser or even the default one that works for all OSes. Apart from that to make this work I would have to make the actions to send commands to the extension available globally, which I find a bit messy.
So I have decided to make this command available only when the browser is focused.
Some people have moved away from using native apps to using web apps when available in order to be able to use Rango. One small issue with this is that there is no way to directly focus one of those web apps. In knausj we have the command
open {website}
to open one of our custom websites defined in websites.csv. So, for example, I useopen talon slack
often. The problem is every time I use the command it opens a new tab. It would be nice to have a command that worked likeopen
but that it would focus the open tab if there is already one with the same domain. If there is none it would open the page in a new tab (maybe with the option of making it pinned). This command needs to work globally and not just when the browser is focused.So, if in my websites I have
https://app.slack.com/client/T7FPSMV8F,talon slack
and I use the commandbrowse talon slack
, one of two things can happen:https://app.slack.com/client/T7FPSMV8F/C03DN7M6KG8/thread/C03DN7M6KG8-1682434151.155699
it will focus that tab.https://app.slack.com/client/T7FPSMV8F
in a new tab.There are a couple of issues with this implementation though:
https://talonvoice.slack.com,talon slack
it will always open a new tab because going to that address is going to redirect tohttps://app.slack.com
, so the user needs to make sure it stores the redirected address.browse
command is going to focus whichever tab was previously open no matter which workspace you specified.One alternative to handle this second issue is to focus the tab with the same domain but also navigate to the website specified in websites.csv. Maybe this could be a different command, for example something like
browse go talon slack
. Another alternative is to match the entire address when usingbrowse go
, so it no tab matches the entire url it opens a new tab. Afterwards thebrowse
command would prefer the tab that matches the url better.Since this is going to be a global command we also need a way to know which is the default browser to be able to focus it. It could be stored the first time the user uses a Rango command, and also have a command like
rango set default
to override that.