aboutsummaryrefslogtreecommitdiff
path: root/pentadactyl/.pentadactylrc
blob: 243fa250e2bad0c91bda3bfe6aa168867f486406 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
loadplugins '\.(js|penta)$'
group user

set guioptions=Cs
set hintkeys=0123456789

map -b j 5j
map -b k 5k

hi clear

hi s_greenfont     color:#aadb0f;
hi s_palegreenfont color:#909737;
hi s_grayback      background:#161616;
hi s_normal        font-size:16px; font-family:Fantasque Sans Mono;

hi -link=s_normal,s_grayback,s_palegreenfont Normal                                   border-top:1px solid #909737;
hi -link=s_normal,s_grayback,s_palegreenfont StatusLine
hi -link=s_normal,s_grayback,s_palegreenfont StatusLineNormal
hi -link=s_normal,s_grayback,s_palegreenfont StatusLineBroken
hi -link=s_normal,s_grayback,s_palegreenfont StatusLineExtended
hi -link=s_normal,s_grayback,s_palegreenfont StatusLineSecure
hi -link=s_normal,s_grayback,s_palegreenfont CompTitle
hi                                           CompTitleSep                             background:#909737;height:1px;
hi                                           Comp                                     border:0;margin:0;
hi -link=s_normal,s_grayback,s_palegreenfont CompItem
hi -link=s_normal,s_grayback,s_palegreenfont CompItem[selected]                       background:#909737;color:#161616;
hi -link=s_normal,s_palegreenfont            CompItem:nth-child(2n+1)                 background:#121212;
hi -link=s_normal,s_grayback,s_palegreenfont CompItem:nth-child(2n+1)[selected]       background:#909737;color:#161616;

hi -link=s_normal,s_greenfont,s_grayback     Hint                                     font-weight:bold; padding:2px;
hi                                           HintElem                                 background:#a5a5a5;
hi                                           Hint[active]                             background:#aadb0f;color:#161616;
hi                                           HintActive                               background:#aadb0f;

hi                                           Button                                   color:white;

style -name ublick * #nav-bar * {visibility:visible}

command! reader -js <<EOF
if ( buffer.URL.spec.startsWith('about:reader?') ) {
	dactyl.execute('back')
} else {
	dactyl.open('about:reader?url=' + encodeURIComponent(buffer.URL.spec))
}
EOF

command! cite -js <<EOF
var entry = '\\n'
          + '    [...] ' + content.getSelection().toString().replace('\n', '\n    ') + ' [...]\\n'
          + '    <br/>\<br/>\\n'
          + '     ― ' + buffer.URL
          + '\\n';

dactyl.execute('!echo -e "' + entry.replace('"', '\"') + '" >> ~/note/src/quote/inbox.wiki');
EOF

command! explore -js <<EOF
dactyl.execute('!random-bookmark');
EOF

map -builtin -ex <F8>  :reader
map -builtin -ex <F9>  :emenu View.Tabbar
map -builtin -ex <F10> :emenu ScrapBook X.Show in Sidebar

nmap b :emenu ScrapBook X.Save Page<CR>
nmap c :cite<CR>
nmap e :explore<CR>