Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 44 lines (36 sloc) 0.912 kB
#!/usr/bin/ruby
# Dropzone Destination Info
# Name: Copy to Terminal path
# Description: Dropped files will be copied to the current Terminal.app path.
# Handles: NSFilenamesPboardType
# Events: Dragged
# Creator: Aptonic Software
# URL: http://aptonic.com
# IconURL: http://aptonic.com/destinations/icons/terminal.png
def dragged
`osascript <<END
tell application "Terminal"
activate
do script "echo Dropzone: \\$PWD" in selected tab of front window
end tell
END`
sleep(1)
contents=`osascript <<END
tell application "Terminal"
tell front window
contents of selected tab as text
end
end
END`
if contents.split("\n")[-2] =~ /Dropzone: (.*)/
destination = $1
$dz.determinate(true)
$dz.begin("Copying files...")
Rsync.do_copy($items, destination, false)
$dz.finish("Copy Complete")
$dz.url(false)
else
$dz.finish("Error")
$dz.url(false)
end
end
Jump to Line
Something went wrong with that request. Please try again.