Created
October 20, 2012 11:38
-
-
Save johntyree/3923083 to your computer and use it in GitHub Desktop.
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
| 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