aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/duclare/uzbl.conf
blob: 1ce5944f08dc57e142df4479053ce394ad4b7029 (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
69
70
71
72
73
74
75

# example uzbl config. in a real config, we should obey the xdg spec

# all keys in the behavior group are optional.  if not set, the corresponding behavior is disabed.
# bindings_internal denote keys to trigger actions internally in uzbl
# bindings_external denote keys to trigger scripts outside uzbl

# keyboard behavior is vimstyle by default (all actions -> 1 key). set
# always_insert_mode to always be in insert mode and disable going out of it.
# if you do this, make sure you've set a modkey so you can reach the actions
# from insert mode by combining them with the modkey

[behavior]
history_handler = /home/duclare/.uzbl/history.sh
download_handler = ~/.uzbl/download.sh
cookie_handler = ~/.uzbl/cookie.sh
status_format = <span font_family="monospace"><span background="darkblue" foreground="white">MODE</span> [<span weight="bold" foreground="red">KEYCMD</span>] <span foreground="#606060"> LOAD_PROGRESSBAR </span><span foreground="blue">URI</span> <span foreground="blue" weight="bold">NAME</span></span>
fifo_dir = /tmp
socket_dir = /tmp
always_insert_mode = 0
modkey = Mod1
show_status = 1
status_top = 0
never_reset_mode = 0

[bindings]
# scroll down/up/left/right
j = scroll_vert 40
k = scroll_vert -40
h = scroll_horz -20
l = scroll_horz 20
b = back
m = forward
s = stop
r = reload
R = reload_ign_cache
w = follow_link_new_window
+ = zoom_in
- = zoom_out
t = toggle_status
#hilight matches
/* = search %s
#jump to next
; = search
gh      = uri http://www.uzbl.org
o_     = uri %s
:wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
ew_ = uri http://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=%s&go=Go

g_    = uri http://www.google.com/search?q=%s
i = insert_mode
B = spawn /home/duclare/.uzbl/insert_bookmark.sh
u = spawn /home/duclare/.uzbl/load_url_from_history.sh
U = spawn /home/duclare/.uzbl/load_url_from_bookmarks.sh
y = spawn /home/duclare/.uzbl/clipboard.sh yank
p = spawn /home/duclare/.uzbl/clipboard.sh goto
W = spawn /home/duclare/.uzbl/launch
ZZ = exit
:q = spawn /home/duclare/.uzbl/session.sh endsession

# Keyboard based link following: work in progress! No C DOM bindings yet, no click() event for hyperlinks so no referrer set..Quite basic but does the job for now...
# Vimperator-like hints, except that you can't type text to narrow on targets.  You can still the text of a link from the beginning, and it'll activate as soon as the word is unique
f* = script var uzblid = 'uzbl_link_hint'; var uzbldivid = uzblid+'_div_container'; var links = document.links; try { HTMLElement.prototype.click = function () {if (typeof this.onclick == 'function') this.onclick({type: 'click'}); } } catch (e) {}  function removeOldHints() { var elements = document.getElementById(uzbldivid); if( elements) elements.parentNode.removeChild(elements); }  function keyPressHandler(e) {var kC  = (window.event) ? event.keyCode : e.keyCode; var Esc = (window.event) ? 27 : e.DOM_VK_ESCAPE; if(kC==Esc) removeOldHints();} function isVisible(obj) { if (obj == document) return true; if (!obj) return false; if (!obj.parentNode) return false; if (obj.style) { if (obj.style.display == 'none') return false; if (obj.style.visibility == 'hidden') return false; } return isVisible(obj.parentNode); }  function elementPosition(el) { var up = el.offsetTop; var left = el.offsetLeft; var width = el.offsetWidth; var height = el.offsetHeight; while(el.offsetParent) { el = el.offsetParent; up += el.offsetTop; left += el.offsetLeft; } return [up,left,width,height]; }  function elementInViewport(el) { offset = elementPosition(el); var up = offset[0]; var left = offset[1]; var width = offset[2]; var height = offset[3]; return (up < (window.pageYOffset + window.innerHeight) && left < (window.pageXOffset + window.innerWidth) && (up + height) > window.pageYOffset && (left + width) > window.pageXOffset); }  function generateHints(items, l) { var hintdiv = document.createElement('div'); hintdiv.setAttribute('id', uzbldivid); for (var i=0; i < items.length; i++) { var nr = items[i]; var li = links[nr]; var pos = elementPosition(li); var hint = document.createElement('div'); hint.setAttribute('name',uzblid); var n = (nr+'').length; for (n; n<l; n++) { nr = '0'+nr; } hint.innerText = nr; hint.style.display='inline'; hint.style.backgroundColor='#B9FF00'; hint.style.border='1px solid #4A6600'; hint.style.color='black'; hint.style.zIndex='1000'; hint.style.opacity='0.7'; hint.style.fontSize='11px'; hint.style.fontWeight='bold'; hint.style.lineHeight='9px'; hint.style.margin='0px'; hint.style.padding='1px'; hint.style.position='absolute'; hint.style.left=pos[1]+'px'; hint.style.top=pos[0]+'px'; var img = li.getElementsByTagName('img'); if (img.length>0) { hint.style.left=pos[1]+(img[0].width/2)+'px'; } hint.style.textDecoration='none'; hint.style.webkitBorderRadius='6px'; hint.style.webkitTransform='scale(0.9) rotate(0deg) translate(-6px,-5px)'; hintdiv.appendChild(hint); } document.body.appendChild(hintdiv); }  function clickLink(item) { removeOldHints(); if (item) { item.click(); window.location = item.href; } }  function followLink(follow) { document.body.setAttribute('onkeyup', 'keyPressHandler(event)'); var s = follow.split(''); var linktexts = [[],[]]; for (var i=0; i < links.length; i++) { var li = links[i]; if (isVisible(li) && elementInViewport(li)) { linktexts[0].push(i); linktexts[1].push(li.innerText); } } var leftovers = []; var nrlength = (linktexts[0][linktexts[0].length-1]+'').length; var linknr = parseInt(follow, 10); if (s.length == nrlength) { clickLink(links[linknr]); } else { for (var j=0; j < linktexts[0].length; j++) { var b = true; for (var k=0; k < s.length; k++) { b = (b && (linktexts[1][j].charAt(k)==s[k])); } if (b) { leftovers.push(linktexts[0][j]); } } if (leftovers.length == 1 && s.length >= nrlength) { clickLink(links[leftovers[0]]); } else if (!document.getElementById(uzbldivid)) { generateHints(linktexts[0], nrlength); } } } followLink('%s');

[network]
# to start a local socks server, do : ssh -fND localhost:8118 localhost
#proxy_server = http://127.0.0.1:8118
#values 0-3
http_debug = 0
user-agent = uzbl (Webkit %webkit-major%.%webkit-minor%.%webkit-micro%)
# Example user agent containing everything:
#user-agent = Uzbl (Webkit %webkit-major%.%webkit-minor%.%webkit-micro%) (%sysname% %nodename% %kernrel% %kernver% %arch-system% [%arch-uzbl%]) (Commit %commit%)
max_conns = 
max_conns_per_host =