Skip to content

Instantly share code, notes, and snippets.

@johntyree
Created October 20, 2012 11:38
Show Gist options
  • Save johntyree/3923083 to your computer and use it in GitHub Desktop.
Save johntyree/3923083 to your computer and use it in GitHub Desktop.
function webview.init_funcs.mailto_hook (view, w)
view:add_signal("navigation-request", function (v, uri)
if string.match(string.lower(uri), "^mailto:") then
luakit.spawn(string.format("%s %q", "urxvtc -title mutt -e mutt", uri))
return false
end
end)
end
function webview.init_funcs.magnet_hook (view, w)
view:add_signal("navigation-request", function (v, uri)
if string.match(string.lower(uri), "^test:") then
luakit.spawn(string.format("%s %q", "add_torrent.sh", uri))
return false
end
end)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment