Giter Club home page Giter Club logo

alfred-safari-tabs-workflow's Introduction

Safari Tabs Workflow for Alfred 2.0

A workflow to manage Safari tabs in Alfred 2.0.

The workflow allows you to search all open tabs in all open windows and selecting a result will change to the tab and focus the window.

The workflow only includes one command:

  • tabs (query) Searches for tabs matching the specified query. Both name of the tab as well as the URL is matched. The query is optional and if no query is specified, all open tabs will be listed.

When ”hovering” over a tab in the list, you can use one of the following modifier keys or, of course, simply select the tab to bring it to focus. The modifier keys and their actions are listed below.

  • alt Creates a new e-mail with Mail.app in which the name of the tab is the subject and the URL is included in the contents.
  • ctrl Closes all tabs and windows but the selected tab.
  • cmd Closes the selected tab.

About

The workflow is developed by @simonbs.

alfred-safari-tabs-workflow's People

Contributors

simonbs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

alfred-safari-tabs-workflow's Issues

[ERROR: alfred.workflow.input.scriptfilter]

Typing "tabs" seem to trigger the workflow as the "Search for tabs" message appears. After a little while tho, Alfred falls back to web searches.

At this time, this error is logged to the debugger:

Starting debug for 'Safari Tabs'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "tabs.py", line 9, in show_tabs
    wins_tabs = all_tabs()
  File "tabs.py", line 74, in all_tabs
    return json.loads(output)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

I just installed the Workflow, and had Safari already open with 11 open tabs. Versions:

  • Alfred 2.3
  • OS X 10.9.3
  • Safari 7.0.4
  • Python 2.7.5

Not sure if the problem will go away once I restart Safari/Alfred/the computer, but I thought you'd like the error report.

Mavericks

Just a heads up that this workflow doesn't appear to work on Mavericks DP6.

Use with WebKit nightly?

I had thought that changing

tell application "Safari"

to

tell application "WebKit"

would make your awesome-looking workflow work with the WebKit nightly but alas.

I tried running the AppleScript fragment directly and got

error "WebKit got an error: AppleEvent handler failed." number -10000    

in the line

set tabscount to count of every tab of win

Any suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.