manzara Posted March 4 Share Posted March 4 (edited) Required information: I am the author of this workflow. Github link: https://github.com/lcmanzara/OpenArcTab This workflow assumes the Arc browser is already installed. It will gracefully handle the situation where it is not installed, displaying an error message. Full description: This workflow searches the Arc application for pinned, unpinned, and top tabs, as well as named spaces, enabling the user to select a particular tab or space to open. The user can configure the workflow to separately include or exclude pinned, unpinned, and top tabs, as well as spaces. The user can also specify if the search results are presented in sorted alphabetic order or in "natural order", where the tabs and spaces are listed as they appear in the Arc browser's sidebar. The workflow can also handle the situation where there are multiple Arc windows open, each with multiple spaces and tabs. For tabs, the search results will show the tab name as the main title, and the window number (if there are multiple windows open), the kind of tab, the space name, and the corresponding URL as the subtitle. For spaces, the search results will show the space name as the main title, and "Arc Space" as the subtitle. This workflow can be triggered by typing the "[" character after invoking Alfred, or with the option-commmand-[ hotkey. No space is needed after the "[" character, which makes starting the search process very efficient. Although the workflow depends on the Arc application being installed, it will gracefully handle the situation where it is not installed, and will display an error message. Note that there may be no search results to display if the user has configured the workflow to exclude all tabs and spaces, or if the Arc browser does not have any windows currently open. The workflow will handle this situation gracefully, and will display an error message. Screenshots: Edited March 9 by manzara raguay.customct 1 Link to comment Share on other sites More sharing options...
vitor Posted March 7 Share Posted March 7 Welcome @manzara, The workflow uses the same icon as another already in the Gallery, so could you please change it? It seems like you may be able to do your own, but https://font2png.com is a good resource for quick icons (with non-transparent background and rounded corners recommended). That also means a new screenshot, but I only need the first one. Could you temporarily edit your theme (Alfred Preferences → Themes → Appearance → Options (bottom left)) to Show result subtext: Always before taking it? On 3/4/2023 at 6:34 AM, manzara said: This workflow can be triggered by typing the "[" character after invoking Alfred, or with the option-commmand-[ hotkey. No space is needed after the "[" character, which makes starting the search process very efficient. Note that character is hard to type on certain keyboard layouts. It’s fine to have it as a default, but because it’s so short and atypical please make it configurable. Other than those two small things, everything looks good to go. Link to comment Share on other sites More sharing options...
snoop182 Posted March 7 Share Posted March 7 Hello, nice workflow, thx. Is it possible to replace Tab icons in script Filter dropdown list by favicons of the tabs ? Link to comment Share on other sites More sharing options...
manzara Posted March 9 Author Share Posted March 9 Unfortunately, it is not possible to retrieve and display the favicons of Arc tabs. Their scripting API doesn't have this capability, and allows only textual information such as the tab title and URL to be retrieved. Their API also doesn't allow one determine the association between a top tab (a "favourite") and the profile in which it resides. If the Arc developers update their API, then I'll also update this workflow to reflect any new capabilities that they provide. snoop182 1 Link to comment Share on other sites More sharing options...
manzara Posted March 9 Author Share Posted March 9 As requested by vitor, I have updated the workflow with a new icon, and have made the workflow keyword user configurable. The updated description and screenshots appear below: Required information: I am the author of this workflow. Github link: https://github.com/lcmanzara/OpenArcTab This workflow assumes the Arc browser is already installed. It will gracefully handle the situation where it is not installed, displaying an error message. Full description: This workflow searches the Arc application for pinned, unpinned, and top tabs, as well as named spaces, enabling the user to select a particular tab or space to open. The user can configure the workflow to separately include or exclude pinned, unpinned, and top tabs, as well as spaces. The user can also specify if the search results are presented in sorted alphabetic order or in "natural order", where the tabs and spaces are listed as they appear in the Arc browser's sidebar. The workflow can also handle the situation where there are multiple Arc windows open, each with multiple spaces and tabs. For tabs, the search results will show the tab name as the main title, and the window number (if there are multiple windows open), the kind of tab, the space name, and the corresponding URL as the subtitle. For spaces, the search results will show the space name as the main title, and "Arc Space" as the subtitle. This workflow can be triggered by typing the "[" character after invoking Alfred, or with the option-commmand-[ hotkey. No space is needed after the "[" character, which makes starting the search process very efficient. If desired, you can configure the workflow to use a different keyword to trigger the workflow. Using a single non alphabetic character such as ";" or "\" works best since it minimizes the amount of typing you have to do, but whole words such as "oat" or "oat " also work. If you change the keyword to another character, you should also change the hotkey combination to use the same single non-alphabetic character (for example, option-command-; or option-command-\). Although the workflow depends on the Arc application being installed, it will gracefully handle the situation where it is not installed, and will display an error message. Note that there may be no search results to display if the user has configured the workflow to exclude all tabs and spaces, or if the Arc browser does not have any windows currently open. The workflow will handle this situation gracefully, and will display an error message. Screenshots: Link to comment Share on other sites More sharing options...
manzara Posted March 9 Author Share Posted March 9 Here's the last screenshot, showing the revised user configuration: Link to comment Share on other sites More sharing options...
vitor Posted March 9 Share Posted March 9 Thank you for the fast changes. It will be live soon at http://alfred.app/workflows/lcmanzara/open-arc-tab. One thing: since you’re doing GitHub releases, it would be expected that the workflow would be included in the Assets portion of the release instead of being a file in the repo. Link to comment Share on other sites More sharing options...
manzara Posted March 10 Author Share Posted March 10 8 hours ago, vitor said: Thank you for the fast changes. It will be live soon at http://alfred.app/workflows/lcmanzara/open-arc-tab. One thing: since you’re doing GitHub releases, it would be expected that the workflow would be included in the Assets portion of the release instead of being a file in the repo. Thanks Vitor. I have added the workflow as a zipped file in the Release section of the GitHub repository. vitor 1 Link to comment Share on other sites More sharing options...
mattsim23 Posted July 30 Share Posted July 30 Hey @manzaraThanks for this very useful workflow! Do you think I am able to use a keyboard shortcut (ie cmd+W) to open a particular pinned tab? for instance, I would like to access whatsapp which is pinned. With your workflow I activate alfred and then go [_Whatsapp_ENTER. Any idea if that can be done with one shortcut? Thanks, Link to comment Share on other sites More sharing options...
manzara Posted August 4 Author Share Posted August 4 I don't think this is possible due to the way Alfred is structured. Alfred requires one to give it a list of items (in this case tabs or spaces that are currently used in Arc), and then Alfred uses this list to repeatedly narrow down what is shown based on the letters you successively type. Once you hit enter, Alfred then goes ahead and asks Arc to open the specified tab. So, unfortunately, this will have to be a two-step procedure, and precludes selecting a tab with just one keyboard shortcut (at least, using this workflow). Perhaps other workflow developers could weigh in here and suggest if there is a way to do this in Alfred. Link to comment Share on other sites More sharing options...
vitor Posted August 4 Share Posted August 4 @manzara That query was solved in another issue. Link to comment Share on other sites More sharing options...
Stooovie Posted August 5 Share Posted August 5 (edited) Any idea why it takes upwards of 30 seconds to find the tab? Arc 1.2.1, Alfred 5.1.2, Ventura 13.5 on MBP with M1 Pro 2021. Happens even when I search for pinned tabs only (I have only 10). CPU is NOT taxed by anything else, and it's a 16GB model with plenty RAM free. Edited August 5 by Stooovie Link to comment Share on other sites More sharing options...
manzara Posted August 10 Author Share Posted August 10 On 8/5/2023 at 2:41 PM, Stooovie said: Any idea why it takes upwards of 30 seconds to find the tab? Arc 1.2.1, Alfred 5.1.2, Ventura 13.5 on MBP with M1 Pro 2021. Happens even when I search for pinned tabs only (I have only 10). CPU is NOT taxed by anything else, and it's a 16GB model with plenty RAM free. There are a few places where the speed may be impacted: 1. If you start the workflow and Arc isn't yet running, then the workflow will launch the application. This can take a few seconds. 2. The workflow then queries Arc for the required information. If you have a lot of tabs, spaces, and/or windows, this can take some time. Remember that the workflow uses Arc's javascript API to gather this information, and Arc itself may take sometime to respond to these queries. 3. The workflow takes this lists and sorts it into ascending alphabetic order, using Javascript's built in "sort" function. I don't know how this is implemented, but If this algorithm is an N squared algorithm, instead of an N log N algorithm, then it will be slow for large lists. 4. The workflow is written in Javascript, which is an interpreted language, and thus can be rather slow, especially for large workloads. Here's a couple of things you can try to speed things up: 1. Configure the workflow so that you exclude items you don't need to search for. 2. Turn off the alphabetic sorting (i.e. specify "natural order"). 3. If you can, reduce the number of tabs you store in Arc. Of course, you may not want to do this. I hope this helps, and let us know if you are able to improve the search speed. Link to comment Share on other sites More sharing options...
barschreck Posted August 17 Share Posted August 17 Is there a way to predefine a query argument. Currently I use Alfred quicklinks to open Tabs. So when I type teams -> a new tab with Microsoft Teams opened. It would be better if it just focuses my pinned tab in Arc. so my goal is to just type "teams" and then my pinned Arc Tab with Teams already opened is getting focused. Link to comment Share on other sites More sharing options...
manzara Posted August 20 Author Share Posted August 20 On 8/17/2023 at 4:34 AM, barschreck said: Is there a way to predefine a query argument. Currently I use Alfred quicklinks to open Tabs. So when I type teams -> a new tab with Microsoft Teams opened. It would be better if it just focuses my pinned tab in Arc. so my goal is to just type "teams" and then my pinned Arc Tab with Teams already opened is getting focused. The workflow itself currently doesn't allow you to predefine a query argument, but you could create your own custom workflow that invokes the Open Arc Tab with a hotkey. See Vitor's August 4 message that points to another thread that shows how you could do this. Note that you can focus on your already-opened Arc tab by typing "[teams", but it seems you want to avoid typing the workflow keyword (i.e. the "["). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now