* .config/tridactyl/tridactylrc: Add bindings for watching videos in mpv.
[~bandali/configs] / .config / tridactyl / tridactylrc
index 1fc49fc..bb717e3 100644 (file)
@@ -1,13 +1,9 @@
-bind j scrollline 2
-bind k scrollline -2
 bind n scrollline 2
 bind p scrollline -2
 
 bind 0 scrollto 0 x
 bind - scrollto 100 x
 
-bind J tabprev
-bind K tabnext
 bind P tabprev
 bind N tabnext
 
@@ -27,12 +23,21 @@ bind O fillcmdline bmarks
 
 bind ;<Space> fillcmdline_notrail
 
+bind ;v hint -; video
+
+command mpvmp4 js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('mpv --no-terminal --ytdl-format=mp4 ' + url))
+bind ;gv hint -W mpvmp4
+
+bind ;gV js tri.excmds.exclaim_quiet('mpv --no-terminal --ytdl-format=mp4 ' + document.location.href)
+
 unbind <C-f>
 
 set hintfiltermode vimperator-reflow
 set hintnames numeric
+set urlparenttrailingslash false
 
-set browser iceweasel
+set browser abrowser
+" set newtab https://bandali.eu.org
 
 seturl warrior.uwaterloo.ca noiframe true