dot-files/tridactyl/.config/tridactyl/tridactylrc

71 lines
2.4 KiB
Plaintext

" Shamelessly taken from bovine3dom's exemple configuration file from the doc
" 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
" Use the dark color scheme
colorscheme dark
" Make tridactyl open Vim in Termite instead of xterm
set editorcmd termite --class tridactyl_editor -e 'vim %f'
"
" Binds
"
" Comment toggler for Reddit and Hacker News
bind ;c hint -c [class*="expand"],[class="togg"]
" 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
" Only hint search results on DuckDuckGo
bindurl ^https://duckduckgo.com f hint -Jc [class=result__a]
bindurl ^https://duckduckgo.com F hint -Jbc [class=result__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
" Search forward
bind / fillcmdline find
" Search backward
bind ? fillcmdline find -?
" Go to the next match
bind n findnext 1
" Go to the previous match
bind N findnext -1
" Allow Tridactyl and other extensions on Mozilla reserved pages
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.")))
"
" URL Redirects
"
" Always redirect Reddit to the old site
autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
" This will have to do until someone writes us a nice syntax file :)
" vim: set filetype=vim: