123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467 |
-
-
-
-
-
-
- set prefix = @(echo $PREFIX)@
- set data_home = @(echo $XDG_DATA_HOME)@
- set cache_home = @(echo $XDG_CACHE_HOME)@
- set config_home = @(echo $XDG_CONFIG_HOME)@
-
-
- set fifo_dir = /tmp
- set socket_dir = /tmp
-
- set shell_cmd = sh -c
-
-
-
-
-
- set mode_config = request MODE_CONFIG
-
- set on_event = request ON_EVENT
-
- set on_set = request ON_SET
-
- set modmap = request MODMAP
-
- set ignore_key = request IGNORE_KEY
-
- set toggle_modes = request TOGGLE_MODES
-
- set set_mode = set mode =
- set set_status = set status_message =
-
-
- set scripts_dir = @data_home/uzbl:@prefix/share/uzbl/examples/data:scripts
-
-
-
-
-
- set scheme_handler = sync_spawn @scripts_dir/scheme.py
-
- set authentication_handler = sync_spawn @scripts_dir/auth.py
- set download_handler = sync_spawn @scripts_dir/download.sh
-
-
-
-
-
- @on_event NEW_WINDOW sh 'uzbl-browser ${1:+-u "$1"}' %r
-
-
-
-
-
-
-
-
- @on_event REQ_NEW_WINDOW event NEW_WINDOW %s
-
-
- @on_event LOAD_START @set_status <span foreground="khaki">wait</span>
-
- @on_event LOAD_START @set_mode
-
-
- @on_event LOAD_COMMIT @set_status <span foreground="green">recv</span>
-
-
- @on_event LOAD_COMMIT js uzbl = {};
- @on_event LOAD_COMMIT script @scripts_dir/formfiller.js
- @on_event LOAD_COMMIT script @scripts_dir/follow.js
-
-
-
-
-
- @on_event LOAD_FINISH @set_status <span foreground="gold">done</span>
- @on_event LOAD_FINISH spawn @scripts_dir/history.sh
-
-
- @on_event FOCUS_ELEMENT sh 'if [ "$1" = INPUT -o "$1" = TEXTAREA -o "$1" = SELECT ]; then echo "@set_mode insert" > $UZBL_FIFO; fi' %s
-
- @on_event ROOT_ACTIVE @set_mode command
-
-
-
-
-
- @on_event SCROLL_VERT set scroll_message = \@<(function(curr, min, max, size){if(max == size) return '--'; var p=(curr/(max - size)); return Math.round(10000*p)/100;})(%1,%2,%3,%4)>\@%
-
-
-
-
- set stylesheet_uri = file://@config_home/uzbl/style.css
-
- set show_status = 1
- set status_top = 0
- set status_background =
-
- set modcmd_style = weight="bold" foreground="red"
- set keycmd_style = weight="light" foreground="red"
- set prompt_style = foreground="grey"
- set cursor_style = underline="single"
- set completion_style = foreground="green"
- set hint_style = weight="bold"
-
- set mode_section = <span background="khaki" foreground="black">[\@[\@mode_indicator]\@]</span>
- set keycmd_section = [<span \@prompt_style>\@[\@keycmd_prompt]\@</span><span \@modcmd_style>\@modcmd</span><span \@keycmd_style>\@keycmd</span><span \@completion_style>\@completion_list</span>]
- set progress_section = <span foreground="#606060">\@[\@progress.output]\@</span>
- set scroll_section = <span foreground="#606060">\@[\@scroll_message]\@</span>
- set uri_section = <span foreground="#99FF66">\@[\@uri]\@</span>
- set name_section = <span foreground="khaki">\@[\@NAME]\@</span>
- set status_section = <span foreground="orange">\@status_message</span>
- set selected_section = <span foreground="#606060">\@[\@SELECTED_URI]\@</span>
-
- set download_section = <span foreground="white">\@downloads</span>
-
- set status_format = <span font_family="monospace">@mode_section @keycmd_section @progress_section @name_section @status_section @scroll_section @selected_section @download_section</span>
- set status_format_right = <span font_family="monospace"><span foreground="#666">uri:</span> @uri_section</span>
-
- set title_format_long = \@keycmd_prompt \@raw_modcmd \@raw_keycmd \@TITLE - Uzbl browser <\@NAME> \@SELECTED_URI
-
-
-
-
- set progress.width = 8
- set progress.format = [%d>%p]%c
- set progress.done = =
- set progress.pending =
-
-
-
- set useragent = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}) (@(+uname -sm)@ [@ARCH_UZBL])
-
-
-
-
-
-
-
-
-
-
-
-
- set ssl_ca_file = /etc/ssl/certs/ca-certificates.crt
- set ssl_verify = 1
-
- @cbind !ssl = chain 'toggle ssl_verify' 'reload'
-
- @on_event LOAD_ERROR js var patt=new RegExp('SSL handshake failed'); if (patt.test('%3')) {alert ('%3');}
-
-
-
-
-
- @modmap <Control> <Ctrl>
- @modmap <ISO_Left_Tab> <Shift-Tab>
- @modmap <space> <Space>
- @modmap <KP_Enter> <Enter>
-
-
- @ignore_key <ISO_*>
- @ignore_key <Shift>
- @ignore_key <Multi_key>
- @ignore_key <Mod2>
-
-
-
-
- set bind = request MODE_BIND global
-
-
- set mode_bind = request MODE_BIND
-
-
- set ibind = @mode_bind insert
-
-
- set cbind = @mode_bind command
-
-
- set ebind = @mode_bind global,-insert
-
-
-
-
- @on_event ESCAPE @set_mode
- @on_event ESCAPE event KEYCMD_CLEAR
- @on_event ESCAPE js uzbl.follow.clearHints()
- @on_event ESCAPE search_clear
- @on_event ESCAPE js window.getSelection().removeAllRanges()
- @bind <Escape> = event ESCAPE
- @bind <Ctrl>[ = event ESCAPE
-
-
- @ebind <Return> = event KEYCMD_EXEC_CURRENT
- @ebind <Home> = event SET_CURSOR_POS 0
- @ebind <End> = event SET_CURSOR_POS -1
- @ebind <Left> = event SET_CURSOR_POS -
- @ebind <Right> = event SET_CURSOR_POS +
- @ebind <BackSpace> = event KEYCMD_BACKSPACE
- @ebind <Delete> = event KEYCMD_DELETE
- @ebind <Tab> = event START_COMPLETION
-
- @ebind <Ctrl>w = event KEYCMD_STRIP_WORD \ -./&?=
- @ebind <Ctrl>u = event SET_KEYCMD
- @ebind <Ctrl>a = event SET_CURSOR_POS 0
- @ebind <Ctrl>e = event SET_CURSOR_POS -1
-
- @ebind <Up> = event HISTORY_PREV
- @ebind <Down> = event HISTORY_NEXT
- @ebind <Ctrl>r<search:>_ = event HISTORY_SEARCH %s
-
-
-
-
-
-
-
-
-
- @bind <Button2> = sh 'if [ "$1" ]; then echo "event REQ_NEW_WINDOW $1" > "$UZBL_FIFO"; else echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"; fi' '\@SELECTED_URI'
-
-
-
-
-
- @cbind :_ = %s
-
-
- @cbind w = event REQ_NEW_WINDOW
-
-
- @cbind j = scroll vertical 20
- @cbind k = scroll vertical -20
- @cbind h = scroll horizontal -20
- @cbind l = scroll horizontal 20
- @cbind <Page_Up> = scroll vertical -100%
- @cbind <Page_Down> = scroll vertical 100%
- @cbind <Ctrl>f = scroll vertical 100%
- @cbind <Ctrl>b = scroll vertical -100%
- @cbind << = scroll vertical begin
- @cbind >> = scroll vertical end
- @cbind <Home> = scroll vertical begin
- @cbind <End> = scroll vertical end
- @cbind ^ = scroll horizontal begin
- @cbind $ = scroll horizontal end
- @cbind <Space> = scroll vertical end
- @cbind G<Go To:>_ = scroll vertical %r!
- @cbind _G<Go To:>_ = scroll horizontal %r!
-
-
- @cbind b = back
- @cbind m = forward
- @cbind S = stop
- @cbind r = reload
- @cbind R = reload_ign_cache
-
-
- @cbind + = zoom_in
- @cbind - = zoom_out
- @cbind T = toggle zoom_type
- @cbind 1 = set zoom_level = 1.0
- @cbind 2 = set zoom_level = 2.0
-
-
- @cbind t = toggle show_status
-
-
- @cbind /* = search %s
- @cbind ?* = search_reverse %s
-
- @cbind n = search
- @cbind N = search_reverse
-
-
- @cbind <Ctrl>p = hardcopy
-
-
- @cbind gg<Google:>_ = uri http://www.google.com/search?q=\@<encodeURIComponent(%r)>\@
- @cbind ddg<DuckDuckGo:>_ = uri http://duckduckgo.com/?q=%s
- @cbind \\awiki<Archwiki:>_ = uri http://wiki.archlinux.org/index.php/Special:Search?search=\@<encodeURIComponent(%r)>\@&go=Go
- @cbind \\wiki<Wikipedia:>_ = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@<encodeURIComponent(%r)>\@&go=Go
-
-
-
- @cbind s<var:>_<value:>_ = set %1 = %2
-
- @cbind ZZ = exit
-
- @cbind !dump = sh 'echo dump_config > "$UZBL_FIFO"'
-
- @cbind !reload = sh "sed '/^# === Post-load misc commands/,$d' \"$UZBL_CONFIG\" | grep '^set ' > \"$UZBL_FIFO\""
-
-
-
- @cbind <Ctrl><Mod1>t = sh 'xterm -e "socat unix-connect:\"$UZBL_SOCKET\" -"'
-
-
-
- @cbind o<uri:>_ = uri %s
-
- @cbind O<uri:\@uri>_ = uri %s
-
-
- @cbind i = @set_mode insert
- @bind <Ctrl>i = @set_mode insert
-
-
- @cbind gh = uri http://www.uzbl.org
-
-
- @cbind gw = event REQ_NEW_WINDOW
-
-
- @cbind zs = uri \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@
- @cbind zS = event REQ_NEW_WINDOW \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@
-
-
- @cbind yu = sh 'echo -n "$UZBL_URI" | xclip'
- @cbind yU = sh 'echo -n "$1" | xclip' '\@SELECTED_URI'
- @cbind yy = sh 'echo -n "$UZBL_TITLE" | xclip'
- @cbind ys = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ clipboard
-
-
- @cbind c = event REQ_NEW_WINDOW \@uri
-
- @cbind p = sh 'echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
-
- @cbind P = sh 'echo "uri $(xclip -selection clipboard -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
-
- @cbind 'p = sh 'echo "event REQ_NEW_WINDOW $(xclip -o)" > "$UZBL_FIFO"'
-
- @bind <Shift><Insert> = sh 'echo "event INJECT_KEYCMD $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
-
-
- @cbind <Ctrl>m<tags:>_ = sh 'echo "$UZBL_URI $1" >> "$XDG_DATA_HOME"/uzbl/bookmarks' '%s'
-
- @cbind M = spawn @scripts_dir/insert_bookmark.sh
-
-
- @cbind U = spawn @scripts_dir/load_url_from_history.sh
- @cbind u = spawn @scripts_dir/load_url_from_bookmarks.sh
-
-
- @cbind <Ctrl>d = spawn @scripts_dir/insert_temp.sh
- @cbind D = spawn @scripts_dir/load_url_from_temps.sh
-
-
-
- set follow_hint_keys = 0123456789
-
-
-
- @cbind fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'click') >\@
- @cbind Fl* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'newwindow') >\@
- @cbind fL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ set
- @cbind FL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ clipboard
- @cbind fi = spawn @scripts_dir/go_input.sh
-
- @cbind fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ set
- @cbind fS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('click') >\@
- @cbind Fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('newwindow') >\@
- @cbind FS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ clipboard
-
- @cbind ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ set
- @cbind fT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@
- @cbind Ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'newwindow') >\@
- @cbind FT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ clipboard
-
- @cbind '* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@
-
-
-
-
-
-
- set formfiller = spawn @scripts_dir/formfiller.sh
- @cbind ze = @formfiller edit
- @cbind zn = @formfiller new
- @cbind zl = @formfiller load
- @cbind zo = @formfiller once
-
-
-
-
- @cbind gn = event NEW_TAB
- @cbind gN = event NEW_TAB_NEXT
- @cbind go<uri:>_ = event NEW_TAB %s
- @cbind gO<uri:>_ = event NEW_TAB_NEXT %s
-
-
- @cbind gC = exit
- @cbind gQ = event CLEAN_TABS
-
-
- @cbind g< = event FIRST_TAB
- @cbind g> = event LAST_TAB
- @cbind gt = event NEXT_TAB
- @cbind gT = event PREV_TAB
- @cbind gi<index:>_ = event GOTO_TAB %s
-
-
- set preset = event PRESET_TABS
- @cbind gs<preset save:>_ = @preset save %s
- @cbind glo<preset load:>_ = @preset load %s
- @cbind gd<preset del:>_ = @preset del %s
-
-
-
-
-
-
- menu_add Google = set uri = http://google.com
- menu_add Go Home = set uri = http://uzbl.org
- menu_separator separator_1
- menu_add Quit uzbl = exit
-
-
- menu_link_add Print Link = print \@SELECTED_URI
-
-
-
-
- set command = @mode_config command
- set insert = @mode_config insert
- set stack = @mode_config stack
-
-
- @command keycmd_style = foreground="red"
- @command status_background =
- @command mode_indicator = Cmd
- @command keycmd_events = 1
- @command forward_keys = 0
- @command modcmd_updates = 1
-
-
- @insert status_background =
- @insert mode_indicator = Ins
- @insert forward_keys = 1
- @insert keycmd_events = 0
- @insert modcmd_updates = 0
-
-
- @stack keycmd_style = foreground="red"
- @stack status_background =
- @stack mode_indicator = Bnd
- @stack prompt_style = foreground="#888" weight="light"
- @stack keycmd_events = 1
- @stack modcmd_updates = 1
- @stack forward_keys = 0
-
- set default_mode = command
-
-
- sync_spawn_exec @scripts_dir/load_cookies.sh
- sync_spawn_exec @scripts_dir/load_cookies.sh @data_home/uzbl/session-cookies.txt
-
-
- set uri = uzbl.org/doesitwork/@COMMIT
-
|