nix-config/home/firefox/tridactyl/tridactylrc

78 lines
2 KiB
Plaintext
Raw Normal View History

2021-04-05 15:22:53 +02:00
" Shamelessly taken from bovine3dom's example configuration file from the docs
" Basics {{{
" Use dark color scheme
colorscheme dark
" Make tridactyl open Vim in my prefered terminal
set editorcmd @editorcmd@
2021-04-05 15:22:53 +02:00
" }}}
" Binds {{{
" Reddit et al. {{{
" Toggle comments on Reddit, Hacker News, Lobste.rs
bind ;c hint -Jc [class*="expand"],[class*="togg"],[class="comment_folder"]
2021-04-05 15:22:53 +02:00
" Make `gu` take me back to subreddit from comments
bindurl reddit.com gu urlparent 3
2021-04-05 15:22:53 +02:00
" Only hint search results on Google
bindurl www.google.com f hint -Jc #search div:not(.action-menu) > a
bindurl www.google.com F hint -Jbc #search div:not(.action-menu) > 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]
2021-04-05 15:22:53 +02:00
" Only hint item pages on Hacker News
bindurl news.ycombinator.com ;f hint -Jc .age > a
bindurl news.ycombinator.com ;F hint -Jtc .age > a
2021-04-05 15:22:53 +02:00
" }}}
" Better bindings {{{
" Handy multiwindow binds
bind gd tabdetach
bind gD composite tabduplicate; tabdetach
" Duplicate a tab without detaching window
bind <Space>d tabduplicate
2021-04-05 15:22:53 +02:00
" Make yy use canonical links on the few websites that support them
bind yy clipboard yankcanon
" }}}
" Search {{{
" Case insensitive only if fully lowercase
set findcase smart
" Search forward/backward
bind / fillcmdline find
bind ? fillcmdline find -?
" Go to next/previous match
bind n findnext 1
bind N findnext -1
" Because :nohls never works
bind <Space><Space> nohlsearch
" Use browser's native find when using Ctrl-F
unbind <C-f>
" }}}
" }}}
" Redirections {{{
" Always redirect Reddit to the old site
autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
" Use a better Twitter front-end
autocmd DocStart ^http(s?)://twitter.com js tri.excmds.urlmodify("-t", "twitter.com", "nitter.net")
2021-04-05 15:22:53 +02:00
" }}}
" Disabled websites {{{
blacklistadd netflix.com
blacklistadd primevideo.com
2021-04-05 15:22:53 +02:00
blacklistadd jellyfin.belanyi.fr
" }}}
" vim: set filetype=vim foldmethod=marker: