Created
April 24, 2017 11:01
-
-
Save tommorris/307bd7cb7244083f16c6451620da01d6 to your computer and use it in GitHub Desktop.
FoldingText launcher written in JXA (JS for macOS Scripting Architecture). copy into your path and rename to whatever you want it to be (I use `ft`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env osascript -l JavaScript | |
ObjC.import('AppKit') | |
function run(argv) { | |
if (!(Application('FoldingText').running())) { | |
$.NSWorkspace.sharedWorkspace.launchApplication('/Applications/FoldingText.app') | |
} | |
var ft = Application("FoldingText"); | |
argv.forEach(function (item) { | |
var fpath = Path(item); | |
ft.open(fpath); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment