about summary refs log tree commit diff
path: root/luakit
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-05-23 21:48:23 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-05-23 21:48:23 +0700
commit975b62bd33f48d61550088123b5a1bb930558efe (patch)
tree3ce213248c2776f66ffa4a7b3fff8804a226b6b4 /luakit
parent65e17501d4dde544826f3141275b4db3fc2250a4 (diff)
downloaddotfiles-975b62bd33f48d61550088123b5a1bb930558efe.tar.gz
Update 2018-05-23
Diffstat (limited to 'luakit')
-rw-r--r--luakit/.config/luakit/rc.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/luakit/.config/luakit/rc.lua b/luakit/.config/luakit/rc.lua
index d2e60c2..8c72762 100644
--- a/luakit/.config/luakit/rc.lua
+++ b/luakit/.config/luakit/rc.lua
@@ -27,6 +27,15 @@ local window = require "window"
 -- ("$XDG_CONFIG_HOME/luakit/webview.lua" or "/etc/xdg/luakit/webview.lua")
 local webview = require "webview"
 
+webview.add_signal("init", function (view)
+    view:add_signal("navigation-request", function (v, uri)
+        if string.match(string.lower(uri), "^magnet:") then
+            luakit.spawn(string.format("%s %q", "transmission-gtk", uri))
+            return false
+        end
+    end)
+end)
+
 -- Add luakit://log/ chrome page
 local log_chrome = require "log_chrome"