X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=dot-files%2F_config%2Ftridactyl%2Ftridactylrc;h=c9669a5bf5c46b021af728e7f8209377ede5b727;hb=1941de6bf51f21c1e076aad3efd61f82129d6ae0;hp=9d06cf25fe2ac3444e1b316fc726f66b5f7dc45e;hpb=10e32f1372503e3abbf3f4091d4eed04c9e033c2;p=sugar.git diff --git a/dot-files/_config/tridactyl/tridactylrc b/dot-files/_config/tridactyl/tridactylrc index 9d06cf2..c9669a5 100644 --- a/dot-files/_config/tridactyl/tridactylrc +++ b/dot-files/_config/tridactyl/tridactylrc @@ -1,6 +1,100 @@ -fixamo +" -*- vimrc -*- +" Reset Tridactyl +fillcmdline_tmp 3000 Reloading tricatylrc... +sanitise tridactyllocal tridactylsync + +" Add helper commands that Mozillians think make Firefox irredeemably insecure +" https://github.com/tridactyl/tridactyl/commit/fef58f508f6da258ac2a447b02c86e33313b115b +command fixamo_quiet jsb tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""')) +command fixamo js tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""').then(tri.excmds.fillcmdline_tmp(3000, "Permissions added to user.js. Please restart Firefox to make them take affect."))) + +" Configuration +fixamo_quiet +set csp clobber +set editorcmd /usr/pkg/bin/emacsclient +set modeindicatorshowkeys true + +" Reload the rc +bind source + +" Clipboards +bind y clipboard yank +bind Y clipboard yanktitle +" - Copy " :: <URL>" to the clipboard +command yank-title-uri composite js document.getElementsByTagName("title")[0].textContent + ' :: ' + document.location.href | clipboard yank +bind <C-y> yank-title-uri + +" Bookmarks +unbind a + +" Tabs bind h tabprev bind l tabnext -bind y clipboard yank +" Custom commands +unbind <C-x> +" +" - Open an RFC with the given number +command rfc js -p tri.excmds.tabopen('http://tools.ietf.org/html/rfc' + JS_ARG) +bind <C-x><C-r> fillcmdline rfc +" +" - Open package info in the HackageDB +command hackage js -p tri.excmds.tabopen('http://hackage.haskell.org/package/' + JS_ARG) +bind <C-x><C-h> fillcmdline hackage +" +" - Open an issue in the GHC Trac +command ghctrac js -p tri.excmds.tabopen('http://hackage.haskell.org/trac/ghc/ticket/' + JS_ARG) +bind <C-x><C-t> fillcmdline ghctrac +" +" - Way back the current page +command wayback js tri.excmds.open('http://web.archive.org/web/*/' + document.location.href) +bind <C-x><C-w> wayback +" +" - Search or open Official Minecraft Wiki +command mcwiki js -p tri.excmds.tabopen('http://minecraft.gamepedia.com' + (JS_ARG ? '/index.php?search=' + encodeURIComponent(JS_ARG) : '')) +bind <C-x><C-m> fillcmdline mcwiki +" +" - Search or open MoJIRA +command mcjira js -p tri.excmds.tabopen('https://bugs.mojang.com' + (JS_ARG ? '/secure/QuickSearch.jspa?searchString=' + encodeURIComponent(JS_ARG) : '')) +bind <C-x><C-j> fillcmdline mcjira + +" Memories of multi_requester +unbind m +command alc js -p let query=(JS_ARG == '' ? window.prompt('Query') : JS_ARG); if (query !== null) { let uri='https://eow.alc.co.jp/search?q=' + encodeURIComponent(query); if (document.location.hostname == 'eow.alc.co.jp') { tri.excmds.open(uri); } else { tri.excmds.tabopen(uri); } } +bind ma fillcmdline alc + +" Quick marks +" +" - Haskell +quickmark g http://www.haskell.org/ghc/ +quickmark h http://hackage.haskell.org/packages/archive/pkg-list.html +quickmark P https://phabricator.haskell.org/ +" +" - Dropbox +quickmark d https://www.dropbox.com/home +" +" - Google Bookmarks +quickmark m https://www.google.com/bookmarks/ +" +" - Google Translate +quickmark T https://translate.google.com/ +" +" - AWS Console +quickmark a https://console.aws.amazon.com/ +" +" - Banks +quickmark b http://direct.bk.mufg.jp/ +quickmark B http://www.mizuhobank.co.jp/direct/start.html +" +" - Securities +quickmark s https://online.sc.mufg.jp/its/dfw/UTBSITS/user_p/Login# + +" Scrolling +bind j scrollline 1 +bind k scrollline -1 + +" Done +fillcmdline_tmp 3000 tridactylrc successfully reloaded + +" vim: set ft=vimperator: