Skip to content

hzh-cocong/Finder-Workspace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finder-Workspace

A alfred workflow for the Finder that save folder path to the file and restore the window quickly next time.

Save workspace

First, input the command save with Alfred and enter.

Second, choose the path and input the file name.

Finally, it will generate the applescript file like this:

set paths to {"/Users/hzh/test/","/Users/hzh/","/Users/hzh/Downloads/"}
set _length to get the length of paths

tell application "Finder"
    activate
    set _window to make new Finder window
    select _window

    set i to 1
    repeat with _path in paths
        delay 0.1

        set target of front window to (_path as POSIX file)

        if i < _length then
            tell application "System Events"
                tell application process "Finder" to set frontmost to true
                keystroke "t" using command down
            end tell
        end if

        set i to i + 1
    end repeat
end tell

Warnning

It will get all the window path not only current window. So you have to close other window that you want not to save. I tried many methods to no avail because the appscript have no the function which can distinct the window and tab. If you have other great idea, please tell me.

Open workspace

Input the command finder with Alfred and enter. It will restore all the window.

Supported version for Alfred

>= 4.0.0

I created it by the Alfred 4.

The version below 4 may cannot work.

Download

You can download from Packal or click here

About

A alfred workflow for the Finder that save folder path to the file and restore the window quickly next time.

Resources

License

Stars

Watchers

Forks

Packages

No packages published