You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.5 KiB
72 lines
2.5 KiB
" Mostly 'inspired' by @bovine3dom's tridactylrc |
|
|
|
|
|
alias tabsort jsb browser.tabs.query({}).then(tabs => tabs.sort((t1, t2) => t1.url.localeCompare(t2.url)).forEach((tab, index) => browser.tabs.move(tab.id, {index}))) |
|
alias tabuniq jsb browser.tabs.query({}).then(tabs => browser.tabs.remove(tabs.filter((tab, index) => tabs.slice(index + 1).find(t => t.url == tab.url)).map(tab => tab.id))) |
|
|
|
set tabopencontaineraware true |
|
|
|
bind V js tri.native.run(`mpv --ontop --keepaspect-window --profile=protocol.http '${document.location.href}'`) |
|
set newtab about:blank |
|
|
|
" Keep GitLab et al from binding quickfind to / |
|
unbind <C-f> |
|
bind / fillcmdline find |
|
bind ? fillcmdline find -? |
|
bind n findnext 1 |
|
bind N findnext -1 |
|
bind ,<Space> nohlsearch |
|
|
|
bind co tabonly |
|
|
|
" 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 |
|
|
|
" Only hint search results on Google and DDG |
|
bindurl www.google.com f hint -Jc .rc > .r > a |
|
bindurl www.google.com F hint -Jbc .rc>.r>a |
|
|
|
bindurl ^https://duckduckgo.com f hint -Jc [class=result__a] |
|
bindurl ^https://duckduckgo.com F hint -Jbc [class=result__a] |
|
|
|
" Allow Ctrl-a to select all in the commandline |
|
unbind --mode=ex <C-a> |
|
|
|
" Allow Ctrl-c to copy in the commandline |
|
unbind --mode=ex <C-c> |
|
|
|
" 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 -; |
|
|
|
set editorcmd emacsclient --create-frame %f |
|
bind --mode=normal gi composite focusinput -l | editor |
|
|
|
" Sane hinting mode |
|
set hintfiltermode vimperator-reflow |
|
set hintnames numeric |
|
|
|
" Defaults to 300ms but I'm a 'move fast and close the wrong tabs' kinda chap |
|
set hintdelay 100 |
|
|
|
" A few binds for mpv |
|
|
|
|
|
|
|
bind <Space>i composite hint -Jpipe img src | shellescape | !s xdg-open |
|
bind <Space>o composite hint -Jpipe a href | shellescape | !s xdg-open |
|
bind <Space>m composite hint -Jpipe a href | shellescape | !s mpv --really-quiet |
|
bind <Space>w composite hint -Jpipe img src | shellescape | !s xdg-open |
|
bind <Space>v composite hint -Jpipe a href | shellescape | !s xdg-open |
|
bind <Space>c composite hint -Jpipe href | shellescape | !s tri xdg-open |
|
|
|
" vim: set filetype=tridactyl
|
|
|