-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_tridactylrc
45 lines (42 loc) · 1.96 KB
/
dot_tridactylrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
" General Settings
set tabopencontaineraware true
set newtab about:blank
set editorcmd emacsclient --create-frame %f
set hintfiltermode vimperator-reflow
set hintnames short
set hintchars "asdfgqweryxcv"
set hintdelay 100
set configversion 2.0
" Binds
bind V js tri.native.run(`mpv --ontop --keepaspect-window --profile=protocol.http '${document.location.href}'`)
unbind <C-f>
bind / fillcmdline find
bind ? fillcmdline find -?
bind n findnext 1
bind N findnext -1
bind ,<Space> nohlsearch
bind co tabonly
bind ;c hint -c [class*="expand"],[class="togg"]
bind yg composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | clipboard yank
bind gd tabdetach
bind gD composite tabduplicate | tabdetach
bind yy clipboard yankshort
bind gi composite focusinput -l | editor
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
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]
unbind --mode=ex <C-a>
unbind --mode=ex <C-c>
" Aliases
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)))
alias hint_focus hint -;
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
" vim: set filetype=tridactyl