From de345379ba91a0ef6c28fe55af672a7b002d7df2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 12 Jul 2019 23:59:56 +0200 Subject: [PATCH] [UPDATE][TRIDACTYL] Use a few lines from doc exemple --- tridactyl/.config/tridactyl/tridactylrc | 51 +++++++++++++++++++++---- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/tridactyl/.config/tridactyl/tridactylrc b/tridactyl/.config/tridactyl/tridactylrc index a171d1c..5cf63e4 100644 --- a/tridactyl/.config/tridactyl/tridactylrc +++ b/tridactyl/.config/tridactyl/tridactylrc @@ -1,9 +1,44 @@ -" General Settings -set configversion 1.7 -js tri.config.set("update", {"lastchecktime": 1562966284143}) -js tri.config.set("update", {"nag": true}) -js tri.config.set("update", {"nagwait": 7}) -js tri.config.set("update", {"lastnaggedversion": "1.14.0"}) -js tri.config.set("update", {"checkintervalsecs": 86400}) +" Shamelessly taken from bovine3dom's exemple configuration file from the doc -" vim: set filetype=vim: \ No newline at end of file +" Refresh the configuration from file automatically +sanitise tridactyllocal tridactylsync + +" Make Tridactyl work on more sites at the expense of some security +set csp clobber +fixamo_quiet + +" +" Binds +" + +" Comment toggler for Reddit and Hacker News +bind ;c hint -c [class*="expand"],[class="togg"] + +" GitHub pull request checkout command to clipboard (only works if you're a collaborator or above) +bind yp composite js document.getElementById("clone-help-step-1").textContent.replace("git checkout -b", "git checkout -B").replace("git pull ", "git fetch ") + "git reset --hard " + document.getElementById("clone-help-step-1").textContent.split(" ")[3].replace("-","/") | yank + +" Git{Hub,Lab} git clone via SSH yank +bind yg composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | clipboard yank + +" Make gu take you back to subreddit from comments +bindurl reddit.com gu urlparent 4 + +" Only hint search results on Google +bindurl www.google.com f hint -Jc .rc > .r > a +bindurl www.google.com F hint -Jtc .rc>.r>a + +" Handy multiwindow/multitasking binds +bind gd tabdetach +bind gD composite tabduplicate | tabdetach + +" Make yy use canonical / short links on the 5 websites that support them +bind yy clipboard yankshort + +" Stupid workaround to let hint -; be used with composite which steals semi-colons +command hint_focus hint -; + +" Open right click menu on links +bind ;C composite hint_focus; !s xdotool key Menu + +" This will have to do until someone writes us a nice syntax file :) +" vim: set filetype=vim: