alfredo Posted January 29, 2013 Share Posted January 29, 2013 This workflow allows you to search tabs open in Google Chrome, and bring them into focus. Still need more work, but I wanted some feedback. Source: https://github.com/peteokma/alfred-workflows/tree/master/workflows/chrometabs Workflow: http://d.pr/f/YnVl bfolberth 1 Link to comment
ClintonStrong Posted January 30, 2013 Share Posted January 30, 2013 Noticed a bug: if there are double quotes in a tab's title, the workflow returns no results. I think you can just use `quoted form of (title of theTab)` within the JSON string, and it should add double quotes around it and escape any double quotes within. Also, you might have noticed that if you try to focus a tab that's in a background window, it won't fully bring that window to the foreground (the titlebar is grayed out, and it doesn't respond to keyboard events). You can use AXRaise to fix that. Here's the code I used in my "Search Browser Tabs" workflow: tell application "System Events" to tell process "Google Chrome" perform action "AXRaise" of window 1 end tell Just add that code to the end of the AppleScript, and it should properly focus the window. simonbs 1 Link to comment
alfredo Posted January 30, 2013 Author Share Posted January 30, 2013 Thanks Clinton! I was having a lot of problems getting the focus tab working, I knew there had to be a better solution. This was more meant as a proof of concept. I am working on a much more polished version of this workflow. Link to comment
ClintonStrong Posted January 30, 2013 Share Posted January 30, 2013 I forgot to mention that AXRaise only works if "Enable access for assistive devices" is checked in the Accessibility preference pane. Otherwise you'll just get the same behavior as before (the window will be moved to the front, but won't be fully focused). Not sure how to get around that (other than prompting the user to enable that setting). Link to comment
segphault Posted January 31, 2013 Share Posted January 31, 2013 This is very cool, thanks for sharing! Link to comment
iffy Posted February 3, 2013 Share Posted February 3, 2013 Loving this. Thanks for sharing. Would love to see an alt-option to close the selected tab. Is that possible? Link to comment
iffy Posted February 4, 2013 Share Posted February 4, 2013 Managed to make it work, but seems redundant. Easier to search for a tab, go to it and close it? It could be usable for managing your tabs via Alfred if after hitting [enter] the list just refreshed with an updated search instead of Alfred disappearing. Link to comment
jarhead Posted February 4, 2013 Share Posted February 4, 2013 This one does Safari & Chrome (and other webkit browsers)... Yuri 1 Link to comment
iffy Posted February 5, 2013 Share Posted February 5, 2013 Thanks @jarhead, realised I commented in the wrong thread Link to comment
politicus Posted February 7, 2015 Share Posted February 7, 2015 I downloaded the zip file from github. Created a .alfredworkflow file for the tabs workflow. Installed it on Alfred. Typed "tabs" in Alfred search bar and got the following error in the console log: Starting debug for 'Chrome Tabs' [ERROR: alfred.workflow.input.scriptfilter] Code 1: Traceback (most recent call last): File "get_tabs.py", line 3, in <module> from alfred_utils.feedback import Feedback ImportError: No module named alfred_utils.feedback Link to comment
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