stuartcryan / rapid-browser-tabs-for-alfred Goto Github PK
View Code? Open in Web Editor NEWRapid Browser Tabs Workflow for Alfred
License: Other
Rapid Browser Tabs Workflow for Alfred
License: Other
For anyone intersted in firefox support I created this workflow (which requires installing a Firefox extension).
The following quote from the README pushed me to do it, so thanks :)
As Firefox does not expose its tabs via Applescript, it is not able to be supported. If someone is a whizz at writing Firefox plugins and would like to collaborate on a plugin to get this to work please feel free to get into contact with me.
If @stuartcryan is still around, I'd be happy to help you steal the code from my workflow.
This is an awesome script, and I use it all the time!
One things I've noticed is that there's a several hundred millisecond delay between when I finish typing in my search query, and when results show up. It's totally livable, but I thought I'd check in and ask about it in case you knew the cause off-hand.
It appears to get longer if I have a bunch of tabs open, so it might just be the limits of processing power.
I don't know much Ruby, but that hasn't stopped me from hacking on Ruby scripts in the past. If you don't have time to investigate but can point me to where it might be worthwhile to look, I'm happy to spend a bit of time checking it out myself.
Thanks again for the awesome tool!
The chromium version of Microsoft Edge has become the #2 browser. Can we add support for that?
hi,
I have just installed the workflow and when I search for a tab, the message "Retrieving tabs..." is stuck and does not show any result.
I firstly thought it was just a matter of time for Alfred to index the tabs, but after 30 minutes, it still says the same.
Installed it this morning and tried to do the custom favorites and couldn't get it to work. I deleted my addition to the favorite file but for some reason rbt isn't working for me anymore.
Below is the error message I'm getting.
MacOS 10.12.3
Alfred 3.3
[2017-02-22 10:58:31][ERROR: input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in
'parse': (<unknown>): mapping values are not allowed in this context at line 7 column 10 (Psych::SyntaxError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in
parse_stream'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:153:inparse' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:129:in
load'
from load_list.rb:86:in `
While this is a function with some rather specific use cases, it would be great to be able to define an array of "group names" for each favourite.
Then (with another keyword), enter a group name and each one of those tabs will open one by one, think instantly loading a list of systems, or starting a standard list of tabs when you first start for the day.
Not sure if this is possible in the current code or not.
[ERROR: alfred.workflow.input.scriptfilter] Code 1: load_list.rb:53:in `=~': incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) (Encoding::CompatibilityError)
from load_list.rb:53:in `tab_matches_title?'
from load_list.rb:59:in `tab_matches_query?'
from load_list.rb:195:in `block in <main>'
from load_list.rb:194:in `each'
from load_list.rb:194:in `<main>'
It will be more useful if initial list will be contain opened tabs with favicons, browser names titles and urls
Yandex browser namely
but I cannot understand how
can you help me?
thank you
I have followed the instruction to the letter, but I cannot get this script to work.
I have tried navigating to the workflow directory directly and running load_list.rb
directly, and receive the following errors (I'm on ruby 2.3.0 freshly installed via brew
):
With no parameters:
$ ruby load_list.rb
load_list.rb:17:in `<main>': undefined method `strip' for nil:NilClass (NoMethodError)
With one parameter "test":
ruby load_list.rb test
/Users/josh/Dropbox/Dev/Settings/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A8961C80-CDCD-44D5-8342-9FC7F1519779/browser_tabs/applescript_utils.rb:37:in `block in osascript': AppleScript error: osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Numerics.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist. (BrowserTabs::AppleScriptUtils::AppleScriptError)
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Satimage.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist.
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/XMLLib.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist.
osascript: OpenScripting.framework - scripting addition "/Users/josh/Library/ScriptingAdditions/YouHelper.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist.
from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/open3.rb:205:in `popen_run'
from /usr/local/Cellar/ruby/2.3.0/lib/ruby/2.3.0/open3.rb:95:in `popen3'
from /Users/josh/Dropbox/Dev/Settings/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A8961C80-CDCD-44D5-8342-9FC7F1519779/browser_tabs/applescript_utils.rb:32:in `osascript'
from /Users/josh/Dropbox/Dev/Settings/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A8961C80-CDCD-44D5-8342-9FC7F1519779/browser_tabs/applescript_utils.rb:18:in `run'
from /Users/josh/Dropbox/Dev/Settings/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A8961C80-CDCD-44D5-8342-9FC7F1519779/browser_tabs/commands/command.rb:49:in `run'
from /Users/josh/Dropbox/Dev/Settings/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A8961C80-CDCD-44D5-8342-9FC7F1519779/browser_tabs.rb:62:in `run_command'
from /Users/josh/Dropbox/Dev/Settings/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A8961C80-CDCD-44D5-8342-9FC7F1519779/browser_tabs.rb:31:in `tabs'
from load_list.rb:18:in `<main>'
Not to familiar with Applescript or Ruby, so any help is much appreciated.
I am unable to change the config to /Users/tiffanywhite/Dropbox/RBT/
or to /Library/Application Support/Alfred 3/Workflow Data/com.stuartryan.alfred.rapidbrowsertabs/
as it automatically defaults to /Library/Application Support/Alfred 2/Workflow Data/com.stuartryan.alfred.rapidbrowsertabs/
. I have deleted the Alfred 2 folder, yet, RBT recreates it. I've set up the config the way I needed to but no luck.
Not sure if I can fix it with my limited knowledge. Can you fix it?
Thanks.
Currently the favourites search only looks at the title and the keywords. It does not allow searching by the URL itself.
This is minor but would help round the search out for completeness.
Something that struck me as an obvious enhancement in many ways is to fallback to the Chrome bookmarks instead. Why?
Thanks for a great workflow.
When I try to use the tabs keyword, it fails with error:
Google Chrome got an error: every window doesn’t understand the “count” message
see debug output below
(using Chrome Version 51.0.2704.103 (64-bit) on El Capitan)
Any idea what has gone wrong?
Starting debug for 'Rapid Browser Tabs'
[2016-07-22 14:49:07][ERROR: input.scriptfilter] Code 1: /Users/tim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B59115C-DE86-4B67-9833-6ED5F95F38DF/browser_tabs/applescript_utils.rb:37:in block in osascript': AppleScript error: 119:619: execution error: Google Chrome got an error: every window doesn’t understand the “count” message. (-1708) (BrowserTabs::AppleScriptUtils::AppleScriptError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:217:in
popen_run'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in popen3' from /Users/tim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B59115C-DE86-4B67-9833-6ED5F95F38DF/browser_tabs/applescript_utils.rb:32:in
osascript'
from /Users/tim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B59115C-DE86-4B67-9833-6ED5F95F38DF/browser_tabs/applescript_utils.rb:18:in run' from /Users/tim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B59115C-DE86-4B67-9833-6ED5F95F38DF/browser_tabs/commands/command.rb:49:in
run'
from /Users/tim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B59115C-DE86-4B67-9833-6ED5F95F38DF/browser_tabs.rb:62:in run_command' from /Users/tim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B59115C-DE86-4B67-9833-6ED5F95F38DF/browser_tabs.rb:31:in
tabs'
from load_list.rb:18:in `
Sometimes when going to an already open tab (such as the Alfred forums) it would be great to be able to use a control key modifier to not only open the tab, but open it and force a refresh of the page at the same time.
Although RBT appears to be work, I noticed that Console.app
logs messages like this every time I type a key after the tabs
keyword:
5/20/16 08:46:54.705 Safari[38461]: [<CompletionWindow 0x7f9f423a8480> valueForUndefinedKey:]: this class is not key value coding-compliant for the key orderedTabViewItems.
5/20/16 08:46:54.708 Safari[38461]: An exception was thrown during execution of an NSScriptCommand...
5/20/16 08:46:54.708 Safari[38461]: [<RoundedWindow 0x7f9f3ca8a6a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key orderedTabViewItems.
5/20/16 08:46:56.349 Safari[38461]: An exception was thrown during execution of an NSScriptCommand...
5/20/16 08:46:56.349 Safari[38461]: [<CompletionWindow 0x7f9f423a8480> valueForUndefinedKey:]: this class is not key value coding-compliant for the key orderedTabViewItems.
5/20/16 08:46:56.352 Safari[38461]: An exception was thrown during execution of an NSScriptCommand...
5/20/16 08:46:56.352 Safari[38461]: [<RoundedWindow 0x7f9f3ca8a6a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key orderedTabViewItems.
I realize this seems to be cosmetic, but it would be nice to avoid error messages like these from being logged if possible.
Thanks for creating and maintaining this very useful workflow.
I would like to add some favorites but I can't seem to figure out what you mean by rbsetup when you say "Run 'rbtsetup' and select "Set root config folder location".
Thanks in advance.
Often I can't remember title of tab and would be useful to see all tabs before start typing query.
Now, it show only favorite sites.
For some reason in the current release the tab icon for the Safari browser does not seem to show.
Requires investigation.
Currently there is no feedback given as to the success/failure of the initialisation/synchronisation of the config files.
It would be good to push a notification to provide feedback to the user once this is completed.
(This was attempted prior to v1.0 release but did not make the final cut).
The readme file images are now 404ing
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.