<commit_before># Rapid Browser Tabs Workflow for Alfred
A workflow for Alfred based on the Search Tabs on Safari and Chrome workflow developed by <NAME>.

Rapid Browser Tabs Workflow for Alfred has been forked from this workflow (with Clinton's blessing) and adds the ability to create favourites that can be searched and opened alongside already open tabs in Chrome and Safari.

Command your browser tabs... don't let them command you!

## Donations
This workflow represents many many hours effort of development, testing and rework. The images licensed for this workflow from [DepositPhotos](http://depositphotos.com?ref=1682540) also needed a bit of my moolah. So if you love the workflow, and get use out of it every day, if you would like to donate as a thank you to buy me more caffeine giving Diet Coke, some Cake, or to put towards a shiny new gadget you can [donate to me via Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JM6E65M2GLXHE). 

<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JM6E65M2GLXHE" target="_blank"><img src="https://www.paypalobjects.com/en_AU/i/btn/btn_donateCC_LG.gif" border="0" alt="PayPal — The safer, easier way to pay online."></a>


## Installation

1. Download the .alfredworkflow file
2. Run to import into Alfred

## Setup
Before you can do anything with the workflow you will need to initialise the settings:

1. Run rbtsetup and select 'Initialise Workflow Configuration'
2. The workflow will then copy over the default configuration files and example icons.

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/pre_config.png">

The workflow has been designed to enable settings synchronisation via a mechanism of your choice (such as Dropbox). It is easiest to set this up before you get too deep into configuring the workflow.

To configure synchronisation via Dropbox (as an example):

1. Run 'rbtsetup' and select "Set root config folder location"
2. Update the folder name to point to a new location, my personal preference is "~/Dropbox/AlfredSync/Workflow Data/com.stuartryan.alfred.rapidbrowsertabs/" (however you can use any location as long as you set it to be the same on different computers)
3. Ensure you have ended your path with a trailing forward slash (things will break if you don't) and then save and close the configuration file. 
4. If this is the first computer you are setting the workflow up on (i.e. that directory does not exist or is empty) run rbtsetup then select "Refresh workflow configuration" to copy the default configurations into place
5. Repeat steps 1 to 3 for every subsequent computer you will run the workflow on (after the initial sync has completed via Dropbox).

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/configure_screen.png">

Configure a hotkey:
To make your life easier I also recommend you set up a hotkey for use with the workflow. 

1. Open Alfred
2. Click Workflows --> Rapid Browser Tabs
3. Double click on the Hotkey box
4. Enter your hotkey and ensure the action is set to "Pass through to workflow"
5. The argument should be set to "None"
6. Click Save

## Basic Usage

The default keyword set is "rbt" here are some examples of what you can do:
* rbt google - Will show all tabs you currently have open that have google in the URL or the tab description.
* rbt fb - FB is set as a keyword for Facebook. This will show any current Facebook tabs already open and will also allow you to open a new Facebook tab in your default browser as well.
* rbt nf - Same thing as above but will open Netflix
* rbt netflix - Same as above, workflow will recognise this is a favourite site and show all tabs currently open and will also offer the option to open a new tab to the Netflix website.

For backwards compatibility with the human brain (and the fact that everyone is used to using the keyword "tabs"), an additional entry point into the workflow using the keyword "tabs" has been added. Depending on user feedback this may be removed or adopted permanently in the future.

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/facebook_example.png">

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/favourites_example.png">

## Advanced Configuration - Adding your own favourites

### YAML Config File
Once you have the hang of the basic usage of the workflow, you can get down to configuring extra "Favourites".

The favourites have been designed to represent the most used sites you use, the ones that you access day in and day out so that you can get rapid access to them.

I have found after setting these up originally I have only added to the list a couple of times as it is expected the list will become relatively static after the first couple of weeks usage.

To access the sites configuration:
* Run rbtsetup then select "Modify Sites Configuration"
* The default configuration example has examples that you can copy and modify to add your own favourites

The two basic styles of configuration are:
First Example:
```YAML
YouTube: 
  aliases: "-yt"
  icon: youtube.png
  url: "https://www.youtube.com"
```
Second Example:<commit_msg>Updated README to include new control key modifier<commit_after># Rapid Browser Tabs Workflow for Alfred
A workflow for Alfred based on the Search Tabs on Safari and Chrome workflow developed by <NAME>.

Rapid Browser Tabs Workflow for Alfred has been forked from this workflow (with Clinton's blessing) and adds the ability to create favourites that can be searched and opened alongside already open tabs in Chrome and Safari.

Command your browser tabs... don't let them command you!

## Donations
This workflow represents many many hours effort of development, testing and rework. The images licensed for this workflow from [DepositPhotos](http://depositphotos.com?ref=1682540) also needed a bit of my moolah. So if you love the workflow, and get use out of it every day, if you would like to donate as a thank you to buy me more caffeine giving Diet Coke, some Cake, or to put towards a shiny new gadget you can [donate to me via Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JM6E65M2GLXHE). 

<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JM6E65M2GLXHE" target="_blank"><img src="https://www.paypalobjects.com/en_AU/i/btn/btn_donateCC_LG.gif" border="0" alt="PayPal — The safer, easier way to pay online."></a>


## Installation

1. Download the .alfredworkflow file
2. Run to import into Alfred

## Setup
Before you can do anything with the workflow you will need to initialise the settings:

1. Run rbtsetup and select 'Initialise Workflow Configuration'
2. The workflow will then copy over the default configuration files and example icons.

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/pre_config.png">

The workflow has been designed to enable settings synchronisation via a mechanism of your choice (such as Dropbox). It is easiest to set this up before you get too deep into configuring the workflow.

To configure synchronisation via Dropbox (as an example):

1. Run 'rbtsetup' and select "Set root config folder location"
2. Update the folder name to point to a new location, my personal preference is "~/Dropbox/AlfredSync/Workflow Data/com.stuartryan.alfred.rapidbrowsertabs/" (however you can use any location as long as you set it to be the same on different computers)
3. Ensure you have ended your path with a trailing forward slash (things will break if you don't) and then save and close the configuration file. 
4. If this is the first computer you are setting the workflow up on (i.e. that directory does not exist or is empty) run rbtsetup then select "Refresh workflow configuration" to copy the default configurations into place
5. Repeat steps 1 to 3 for every subsequent computer you will run the workflow on (after the initial sync has completed via Dropbox).

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/configure_screen.png">

Configure a hotkey:
To make your life easier I also recommend you set up a hotkey for use with the workflow. 

1. Open Alfred
2. Click Workflows --> Rapid Browser Tabs
3. Double click on the Hotkey box
4. Enter your hotkey and ensure the action is set to "Pass through to workflow"
5. The argument should be set to "None"
6. Click Save

## Basic Usage

The default keyword set is "rbt" here are some examples of what you can do:
* rbt google - Will show all tabs you currently have open that have google in the URL or the tab description.
* rbt fb - FB is set as a keyword for Facebook. This will show any current Facebook tabs already open and will also allow you to open a new Facebook tab in your default browser as well.
* rbt nf - Same thing as above but will open Netflix
* rbt netflix - Same as above, workflow will recognise this is a favourite site and show all tabs currently open and will also offer the option to open a new tab to the Netflix website.
* ctrl key modifier - The control key when held down while selecting a tab will force the tab to reload/refresh when it is opened

For backwards compatibility with the human brain (and the fact that everyone is used to using the keyword "tabs"), an additional entry point into the workflow using the keyword "tabs" has been added. Depending on user feedback this may be removed or adopted permanently in the future.

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/facebook_example.png">

<img src="http://akamai.technicalnotebook.com/alfred-workflow-images/rapid-browser-tabs-for-alfred/favourites_example.png">

## Advanced Configuration - Adding your own favourites

### YAML Config File
Once you have the hang of the basic usage of the workflow, you can get down to configuring extra "Favourites".

The favourites have been designed to represent the most used sites you use, the ones that you access day in and day out so that you can get rapid access to them.

I have found after setting these up originally I have only added to the list a couple of times as it is expected the list will become relatively static after the first couple of weeks usage.

To access the sites configuration:
* Run rbtsetup then select "Modify Sites Configuration"
* The default configuration example has examples that you can copy and modify to add your own favourites

The two basic styles of configuration are:
First Example:
```YAML
YouTube: 
  aliases: "-yt"
  icon: youtube.png
  url: "https://www.youtube.com"
```
Second Example:
{'fraction_non_alphanumeric': 0.05991639572689271, 'fraction_numerical': 0.006130980027868091, 'mean_word_length': 4.462201927955353, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 8, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6104920', 'n_tokens_mistral': 2984, 'n_tokens_neox': 2816, 'n_words': 1559}