Skip to content

Instantly share code, notes, and snippets.

@SeanLF
Created November 23, 2017 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanLF/a50bb1e19d2f473d65c6fff1619473c2 to your computer and use it in GitHub Desktop.
Save SeanLF/a50bb1e19d2f473d65c6fff1619473c2 to your computer and use it in GitHub Desktop.
macOS app (applescript to handle opening magnet links with a CLI torrent client)
on open location magnetLink
tell application "iTerm"
tell current window
set theCommand to "bash -cil \"[[ -f ~/.bashrc ]] && . ~/.bashrc; webtorrent-hybrid download " & magnetLink & " && read\""
create tab with default profile command theCommand
end tell
end tell
end open location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment