Skip to content

Instantly share code, notes, and snippets.

View TCalkhoven's full-sized avatar
🌟
Inspired

Thijs Calkhoven TCalkhoven

🌟
Inspired
  • Wididi
  • Netherlands
View GitHub Profile
@tkcranny
tkcranny / Open in iTerm.workflow
Last active August 29, 2019 05:09
macOS Sierra Automater service to open iTerm2 from a finder window
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
-- https://gist.github.com/ttimasdf/7bb02ed419db4b472b534e1a57008a3b
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set is_folder to (do shell script "file -b " & quoted form of (POSIX path of my_file))