CrunchBang Linux Pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

CrunchBang Linux Pastebin

Posted by Digit on Sat 4th Aug 03:32 (modification of post by view diff)
download | new post

  1. # Example uzbl config. All settings are optional. You can use uzbl without
  2. # any config at all (but it won't do much).
  3.  
  4. # === Core settings ==========================================================
  5.  
  6. # common directory locations
  7. set prefix      = @(echo $PREFIX)@
  8. set data_home   = @(echo $XDG_DATA_HOME)@
  9. set cache_home  = @(echo $XDG_CACHE_HOME)@
  10. set config_home = @(echo $XDG_CONFIG_HOME)@
  11.  
  12. # Interface paths.
  13. set fifo_dir   = /tmp
  14. set socket_dir = /tmp
  15.  
  16. set shell_cmd       = sh -c
  17.  
  18. # === General config aliases =================================================
  19.  
  20. # Config related events (use the request function):
  21. # request MODE_CONFIG <mode> <key> = <value>
  22. set mode_config     = request MODE_CONFIG
  23. # request ON_EVENT <EVENT_NAME> <command>
  24. set on_event        = request ON_EVENT
  25. # request ON_SET   <key/glob> <command>
  26. set on_set          = request ON_SET
  27. # request MODMAP <From> <To>
  28. set modmap          = request MODMAP
  29. # request IGNORE_KEY <glob>
  30. set ignore_key      = request IGNORE_KEY
  31. # request MODKEY_ADDITION <key1> <key2> <keyn> <result>
  32. set modkey_addition = request MODKEY_ADDITION
  33. # request "TOGGLE_MODES <mode1> <mode2> ... <moden>
  34. set toggle_modes    = request TOGGLE_MODES
  35.  
  36. set set_mode        = set mode =
  37. set set_status      = set status_message =
  38.  
  39. # Spawn path shortcuts. In spawn the first dir+path match is used in "dir1:dir2:dir3:executable"
  40. #set scripts_dir     = /usr/share/uzbl/examples/data/scripts
  41. set scripts_dir     = /home/digit/.config/uzbl/scripts
  42.  
  43.  
  44. # spawn shortcuts path original
  45. #set scripts_dir     = $XDG_DATA_HOME/uzbl:@prefix/share/uzbl/examples/data:scripts
  46.  
  47. # === Hardcoded handlers =====================================================
  48.  
  49. # These handlers can't be moved to the new event system yet as we don't
  50. # support events that can wait for a response from a script.
  51. #set cookie_handler      = talk_to_socket $XDG_CACHE_HOME/uzbl/cookie_daemon_socket
  52. set scheme_handler      = sync_spawn @scripts_dir/scheme.py
  53. set authentication_handler = sync_spawn @scripts_dir/auth.py
  54.  
  55. #see dm-dm section to see what's the dealeo with this.
  56. set download_handler = spawn @dm_dm_start
  57. #set download_handler    = sync_spawn @scripts_dir/download.sh
  58.  
  59. # === Dynamic event handlers =================================================
  60.  
  61. @on_event   NEW_WINDOW     sh 'uzbl-browser ${1:+-u "$1"}' %r
  62. # Open in current window (also see the REQ_NEW_WINDOW event handler below)
  63. #@on_event   NEW_WINDOW     uri %s
  64. # Open in new tab. Other options are NEW_TAB_NEXT, NEW_BG_TAB and NEW_BG_TAB_NEXT.
  65. #@on_event   NEW_WINDOW     event NEW_TAB %s
  66.  
  67. #   What to do when the user requests a new window:
  68. # If your the NEW_WINDOW handler opens the uri in the current window, you'll
  69. # probably want to change this handler to open a new window or tab.
  70. @on_event   REQ_NEW_WINDOW event NEW_WINDOW %s
  71.  
  72. # Load start handler
  73. @on_event   LOAD_START     @set_status <span foreground="khaki">wait</span>
  74. # Reset the keycmd on navigation
  75. @on_event   LOAD_START     @set_mode
  76.  
  77. # Load commit handlers
  78. @on_event   LOAD_COMMIT    @set_status <span foreground="green">recv</span>
  79.  
  80.   # add some javascript to the page for other 'js' and 'script' commands to access later.
  81. @on_event   LOAD_COMMIT    js uzbl = {};
  82. @on_event   LOAD_COMMIT    script @scripts_dir/formfiller.js
  83. @on_event   LOAD_COMMIT    script @scripts_dir/follow.js
  84.  
  85. # Userscripts/per-site-settings. See the script and the example configuration for details
  86. #@on_event   LOAD_COMMIT    spawn @scripts_dir/per-site-settings.py @data_home/uzbl/per-site-settings
  87.  
  88. # Load finish handlers
  89. @on_event   LOAD_FINISH    @set_status <span foreground="gold">done</span>
  90. @on_event   LOAD_FINISH    spawn @scripts_dir/history.sh
  91.  
  92. # Switch to insert mode if a (editable) html form is clicked
  93. @on_event   FORM_ACTIVE    @set_mode insert
  94. # Switch to command mode if anything else is clicked
  95. @on_event   ROOT_ACTIVE    @set_mode command
  96.  
  97. # Example CONFIG_CHANGED event handler
  98. #@on_event  CONFIG_CHANGED print Config changed: %1 = %2
  99.  
  100. # Scroll percentage calculation
  101. @on_event   SCROLL_VERT    set scroll_message = \@<(function(){var p='--';if(%3!=%2){p=(%1/(%3-%4));p=Math.round(10000*p)/100;};return p+'%';})()>\@
  102.    
  103.  
  104. #=================================stuff digit added for a bit ~ here it gets sloppy. lol.
  105. #socialfixer.js check it out... if u can get this working, it aught aleviate much of the interface woes of fb.
  106. @on_event LOAD_COMMIT  spawn @scripts_dir/socialfixer.js
  107.  
  108. #adblock js http://www.uzbl.org/wiki/adblock.js
  109. @on_event   LOAD_COMMIT    script @scripts_dir/adblock.js
  110.  
  111. #adblock py http://www.uzbl.org/wiki/adblock
  112. @on_event   LOAD_COMMIT    spawn @scripts_dir/adblock.py
  113. @on_event   LOAD_PROGRESS  js uzblAdBlock();
  114.  
  115. ##adblock privoxy http://andrwe.org/doku.php/scripting/bash/privoxy-blocklist
  116. #will need to move shit to the appropriate places.
  117. #set proxy_url = http://127.0.0.1:8118
  118. #
  119.  
  120. #someone who cares http://someonewhocares.org/hosts/
  121. #some great ideas... block pages list for example.
  122.  
  123. ##easylist adblockplus filterlist for use with the privoxy method
  124. #abp:subscribe?location=https%3A%2F%2Feasylist-downloads.adblockplus.org%2Feasylist.txt&title=EasyList
  125.  
  126. ##fanboyslist adblockplus filterlist for use with the privoxy method
  127. #abp:subscribe?location=https%3A%2F%2Fsecure.fanboy.co.nz%2Ffanboy-adblock.txt&title=Fanboy%27s%20List
  128. #http://www.fanboy.co.nz/adblock/fanboy-adblock.txt
  129. #http://www.fanboy.co.nz/adblock/fanboy-tracking.txt
  130. #http://www.fanboy.co.nz/adblock/fanboy-addon.txt
  131.  
  132. ## my cool add to adblock menu coolness...
  133. #add_menu adblock this = echo $thething >> ~/.local/share/uzbl/adblock
  134. #menu_add facebook = set uri = http://www.facebook.com
  135.  
  136.  
  137. #dynzoom http://www.uzbl.org/wiki/dynamic_zooming
  138. #@on_event GEOMETRY_CHANGED script @scripts_dir/dynzoom.js
  139. @on_event GEOMETRY_CHANGED spawn @scripts_dir/dynzoom.py \@geometry 1024 768
  140.  
  141. #flashblock http://www.uzbl.org/wiki/flashblock
  142.  
  143. @on_event   LOAD_COMMIT    script @scripts_dir/flashblock.js
  144.  
  145. # Switch to insert mode when javascript focuses text element http://www.uzbl.org/wiki/configtricks
  146. #@on_event LOAD_FINISH sh 'if [ "\@<document.activeElement.type>\@" = "text" ]; then echo "event FORM_ACTIVE" > $4; fi'
  147.  
  148. #http://www.uzbl.org/wiki/change_style.sh
  149. #@on_event   LOAD_COMMIT    spawn @scripts_dir/change_style.sh
  150.  
  151.  
  152. #http://www.uzbl.org/wiki/change_style.sh
  153. #alternative style changer method.
  154. #set conf.d = $XDG_CONFIG_HOME/uzbl
  155. #@on_event LOAD_COMMIT set stylesheet_uri = file://@conf.d/css/\@(s=\@<location.host>\@.css; [ -e @conf.d/css/$s ] || s=default.css; echo $s)\@
  156. #OR
  157. #@on_event LOAD_COMMIT set stylesheet_uri = file://$XDG_CONFIG_HOME/uzbl/styles/\@(s=\@<location.host>\@.css; [ -e $XDG_CONFIG_HOME/uzbl/styles/$s ] || s=default.css; echo $s)\@
  158. # err.. dont use that, it's a half edit.
  159. #@on_event LOAD_COMMIT set stylesheet_uri = file://$XDG_CONFIG_HOME/uzbl/digitstyle.css; [ -e @conf.d/css/$s ] || s=default.css; echo $s)\@
  160.  
  161. # here be the hardcores:
  162. # hardcore intent style
  163. #@on_event LOAD_COMMIT set stylesheet_uri = file://$XDG_CONFIG_HOME/uzbl/clearintent.css; [ -e @conf.d/css/$s ] || s=default.css; echo $s)\@
  164.  
  165. # hardcore witch style
  166. #@on_event LOAD_COMMIT set stylesheet_uri = file://$XDG_CONFIG_HOME/uzbl/style/rowan-9.0.css; [ -e @conf.d/css/$s ] || s=default.css; echo $s)\@
  167.  
  168.  
  169. ## new alternative style changer... http://pastebin.com/rC1kqv3w
  170. #@on_event   LOAD_COMMIT    spawn @scripts_dir/stylish.py
  171.  
  172. # http://www.uzbl.org/wiki/noscript.js
  173. @on_event   LOAD_COMMIT    script @scripts_dir/noscript.js
  174.  
  175. # === Behaviour and appearance ===============================================
  176.  
  177. #my original stylesheet handling stuff
  178. #set stylesheet_uri    = file://home/digit/.local/share/uzbl/userstyles
  179. set stylesheet_uri    = file://@config_home/uzbl/styles/about:blank.css
  180.  
  181. # Custom CSS can be defined here, including link follower hint styles
  182. #set stylesheet_uri = file://@config_home/uzbl/style.css
  183. #set stylesheet_uri = file://usr/share/uzbl/examples/config/digitstyle.css
  184. #set stylesheet_uri = file://@config_home/uzbl/digitstyle.css
  185. #set stylesheet_uri = file://@config_home/uzbl/styles/clearintent.css
  186. set stylesheet_uri = file://@config_home/uzbl/styles/rowan-9.0.css
  187.  
  188. set show_status       = 1
  189. set status_top        = 0
  190. set status_background = #111
  191. set page_background   = #000
  192.  
  193. set modcmd_style      = weight="bold" foreground="red"
  194. set keycmd_style      = weight="light" foreground="red"
  195. set prompt_style      = foreground="#ddd"
  196. set cursor_style      = underline="single"
  197. set completion_style  = foreground="green"
  198. set hint_style        = weight="bold"
  199.  
  200. set mode_section      = <span background="khaki" foreground="black">[\@[\@mode_indicator]\@]</span>
  201. 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>]
  202. set progress_section  = <span foreground="#ccc">\@[\@progress.output]\@</span>
  203. set scroll_section    = <span foreground="#aaa">\@[\@scroll_message]\@</span>
  204. set uri_section       = <span foreground="#99FF66">\@[\@uri]\@</span>
  205. set name_section      = <span foreground="khaki">\@[\@NAME]\@</span>
  206. set status_section    = <span foreground="orange">\@status_message</span>
  207. set selected_section  = <span foreground="#aaa">\@[\@SELECTED_URI]\@</span>
  208.  
  209. set download_section  = <span foreground="yellow">\@downloads</span>
  210.  
  211.  
  212. #my original
  213. #set status_format     = <span font_family="monospace">@mode_section @keycmd_section @progress_section @uri_section @name_section @status_section @scroll_section @selected_section</span>
  214.  
  215. set status_format       = <span font_family="monospace">@mode_section @keycmd_section @progress_section @name_section @status_section @scroll_section @selected_section @download_section</span>
  216. set status_format_right = <span font_family="monospace"><span foreground="#666">uri:</span> @uri_section</span>
  217.  
  218. set title_format_long = \@keycmd_prompt \@raw_modcmd \@raw_keycmd \@TITLE - Uzbl browser <\@NAME> \@SELECTED_URI
  219.  
  220. # Progress bar config
  221. # %d = done, %p = pending %c = percent done, %i = int done, %s = spinner,
  222. # %t = percent pending, %o = int pending, %r = sprite scroll
  223. set progress.width      = 8
  224. set progress.format     = [%d>%p]%c
  225. set progress.done       = =
  226. set progress.pending    =
  227.  
  228. # === Useragent setup ========================================================
  229.  
  230. #my original
  231. #set useragent         = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}.@{WEBKIT_MICRO}) (@(+uname -sm)@ [@ARCH_UZBL]) (Commit @COMMIT)
  232.  
  233. set useragent         = Uzbl (Webkit @{WEBKIT_MAJOR}.@{WEBKIT_MINOR}) (@(+uname -sm)@ [@ARCH_UZBL])
  234.  
  235. # === Configure cookie blacklist ========================================================
  236.  
  237. # Accept 'session cookies' from uzbl.org (when you have a whitelist all other cookies are dropped)
  238. #request WHITELIST_COOKIE domain 'uzbl.org$' expires '^$'
  239.  
  240. # Drop google analytics tracking cookies (applied after whitelists if any)
  241. #request BLACKLIST_COOKIE name '^__utm.$'
  242.  
  243. #request BLACKLIST_COOKIE domain 'microsoft.com$'
  244. #request BLACKLIST_COOKIE domain 'oracle.com$'
  245. #request BLACKLIST_COOKIE domain '.gov$'
  246. #request BLACKLIST_COOKIE domain 'bing.$'
  247. #request BLACKLIST_COOKIE domain 'novell.com$'
  248. #request BLACKLIST_COOKIE domain 'sony.com$'
  249.  
  250.  
  251.  
  252. # === Key binding configuration ==============================================
  253. # --- Internal modmapping and ignoring ---------------------------------------
  254.  
  255. #modmap <From>          <To>
  256. @modmap <Control>       <Ctrl>
  257. @modmap <ISO_Left_Tab>  <Shift-Tab>
  258. @modmap <space>         <Space>
  259. @modmap <KP_Enter>      <Enter>
  260.  
  261. #modkey_addition <Key1>  <Key2>    <Result>
  262. @modkey_addition <Shift> <Ctrl>    <Meta>
  263. @modkey_addition <Shift> <Tab>     <Shift-Tab>
  264. @modkey_addition <Shift> <Insert>  <Shift-Insert>
  265.  
  266. #ignore_key <glob>
  267. @ignore_key <ISO_*>
  268. @ignore_key <Shift>
  269. @ignore_key <Multi_key>
  270.  
  271. # --- Bind aliases -----------------------------------------------------------
  272.  
  273. # request BIND <bind cmd> = <command>
  274. set bind      = request MODE_BIND global
  275.  
  276. # request MODE_BIND <mode> <bind cmd> = <command>
  277. set mode_bind = request MODE_BIND
  278.  
  279. # Insert mode binding alias
  280. set ibind     = @mode_bind insert
  281.  
  282. # Command mode binding alias
  283. set cbind     = @mode_bind command
  284.  
  285. # Non-insert mode bindings alias (ebind for edit-bind).
  286. set ebind     = @mode_bind global,-insert
  287.  
  288. # --- Global & keycmd editing binds ------------------------------------------
  289.  
  290. # Resets keycmd and returns to default mode.
  291. @on_event  ESCAPE    @set_mode
  292. @on_event  ESCAPE    event KEYCMD_CLEAR
  293. @on_event  ESCAPE    js uzbl.follow.clearHints()
  294. @bind   <Escape>     = event ESCAPE
  295. @bind   <Ctrl>[      = event ESCAPE
  296.  
  297. # Commands for editing and traversing the keycmd.
  298. @ebind  <Return>     = event KEYCMD_EXEC_CURRENT
  299. @ebind  <Home>       = event SET_CURSOR_POS 0
  300. @ebind  <End>        = event SET_CURSOR_POS -1
  301. @ebind  <Left>       = event SET_CURSOR_POS -
  302. @ebind  <Right>      = event SET_CURSOR_POS +
  303. @ebind  <BackSpace>  = event KEYCMD_BACKSPACE
  304. @ebind  <Delete>     = event KEYCMD_DELETE
  305. @ebind  <Tab>        = event START_COMPLETION
  306. # Readline-ish bindings.
  307. @ebind  <Ctrl>w      = event KEYCMD_STRIP_WORD
  308. @ebind  <Ctrl>u      = event SET_KEYCMD
  309. @ebind  <Ctrl>a      = event SET_CURSOR_POS 0
  310. @ebind  <Ctrl>e      = event SET_CURSOR_POS -1
  311.  
  312. #@ebind <Up>          = event HISTORY_PREV
  313. #@ebind <Down>        = event HISTORY_NEXT
  314. @ebind <Ctrl>r<search:>_ = event HISTORY_SEARCH %s
  315. # Keycmd injection/append examples.
  316. #@ebind  <Ctrl>su = event INJECT_KEYCMD \@uri
  317. #@ebind  <Ctrl>st = event INJECT_KEYCMD \@title
  318. #@ebind  <Ctrl>du = event APPEND_KEYCMD \@uri
  319. #@ebind  <Ctrl>dt = event APPEND_KEYCMD \@title
  320.  
  321. # --- Mouse bindings ---------------------------------------------------------
  322.  
  323. #my original
  324. # Middle click open in new window
  325. #@bind  <Button2>  = sh 'if [ "$8" ]; then uzbl-browser -u "$8"; else echo "uri $(xclip -o | sed s/\\\@/%40/g)" > $4; fi' \@SELECTED_URI
  326.  
  327. @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'
  328.  
  329. @bind <Button6> = scroll horizontal 20
  330. @bind <Button7> = scroll horizontal -20
  331. @bind <Button8> = back
  332. @bind <Button9> = forward
  333. @bind <Button10> = scroll horizontal 20
  334. @bind <Button11> = scroll horizontal -20
  335.  
  336. # --- Keyboard bindings ------------------------------------------------------
  337.  
  338.  
  339. #copy
  340. @cbind  <Ctrl>c = sh "xclip -o | xclip -selection clipboard"
  341.  
  342.  
  343. #@cbind <Ctrl>c = sh "xclip -selection secondary -o"
  344.  
  345. #@cbind <Ctrl>c = sh "xclip -selection secondary -i"
  346.  
  347.  
  348. #@cbind <Ctrl>c = sh "xclip -selection -secondary -o"
  349.  
  350. #@cbind <Ctrl>c = sh "xclip -i | xclip -selection primary"
  351.  
  352. #@cbind <Ctrl>c = sh "xclip -selection -secondary -o | xclip -clipboard -o"
  353.  
  354. #@cbind <Ctrl>c = sh "xclip -o | xclip -selection clipboard"
  355.  
  356.  
  357. #aledged to work
  358. #@cbind  <Ctrl>c = sh "xclip -o | xclip -selection clipboard"
  359.  
  360. #@bind <Ctrl>c = sh "xclip -selection clipboard -i"
  361. #@cbind <Ctrl>c = sh "xclip -o | xclip -selection clipboard"
  362.  
  363. # With this command you can enter in any command at runtime when prefixed with
  364. # a colon.
  365. @cbind    :_        = %s
  366.  
  367. # open a new window or a new tab (see the on_event NEW_WINDOW settings above)
  368. #@cbind  w            = event REQ_NEW_WINDOW
  369.  
  370.  
  371. #cookie killer.
  372. @cbind ck  = spawn @scripts_dir/cleancookies.py
  373.  
  374. # Page movement binds
  375. @cbind  j            = scroll vertical 20
  376. @cbind  k            = scroll vertical -20
  377. @cbind  h            = scroll horizontal -20
  378. @cbind  l            = scroll horizontal 20
  379. @cbind  <Page_Up>    = scroll vertical -97%
  380. @cbind  <Page_Down>  = scroll vertical 97%
  381. @cbind  <Home>       = scroll vertical begin
  382. @cbind  <<           = scroll vertical begin
  383. @cbind  >>           = scroll vertical end
  384. @cbind  <End>        = scroll vertical end
  385. @cbind  ^            = scroll horizontal begin
  386. @cbind  $            = scroll horizontal end
  387. @cbind  <Space>      = scroll vertical end
  388.  
  389. # Navigation binds
  390. @cbind  b   = back
  391. #@cbind  <BackSpace>    = back
  392. @cbind  ff   = forward
  393. @cbind  S   = stop
  394. @cbind  r   = reload
  395. @cbind  R   = reload_ign_cache
  396.  
  397. # Zoom binds
  398. @cbind  +   = zoom_in
  399. @cbind  =   = zoom_in
  400. @cbind  -   = zoom_out
  401. @cbind  T   = toggle_zoom_type
  402. @cbind  1   = set zoom_level = 0.3
  403. @cbind  2   = set zoom_level = 0.4
  404. @cbind  3   = set zoom_level = 0.5
  405. @cbind  4   = set zoom_level = 0.7
  406. @cbind  5   = set zoom_level = 0.8
  407. @cbind  6   = set zoom_level = 0.9
  408. @cbind  7   = set zoom_level = 1.0
  409. @cbind  8   = set zoom_level = 1.1
  410. @cbind  9   = set zoom_level = 1.4
  411. @cbind  0   = set zoom_level = 2.5
  412.  
  413. # Appearance binds
  414.  
  415. #depreciated statusbar toggle
  416. #@cbind  t   = toggle_status
  417. #new statusbar toggle method using new toggle method
  418. @cbind  t   = toggle show_status
  419.  
  420. # Page searching binds
  421. @cbind  /*  = search %s
  422. @cbind  ?*  = search_reverse %s
  423. # Jump to next and previous items
  424. @cbind  n   = search
  425. @cbind  N   = search_reverse
  426.  
  427. # Print pages to a printer
  428. #@cbind  <Ctrl>p = hardcopy
  429.  
  430. # Web searching binds
  431. #@cbind  gf<scroogle:>_       = uri http://www.scroogle.org/cgi-bin/scraper.htm/search?q=\@<encodeURIComponent(%r)>\@
  432. #@cbind  gf<scroogle:>_       = uri http://www.scroogle.org/cgi-bin/scraper.htm/search?q=%s
  433. @cbind  gf<Scroogle:>_  = uri https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi?Gw=\@<encodeURIComponent(%r)>\@&n=1&l=en
  434. @cbind gh<Scroogle:>_ = set inject_html = <html><body><form action="https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi" method="POST" id="scroogle"><input type="hidden" name="Gw" value="\@[%s]\@" /></form><script type="text/javascript">document.forms['scroogle'].submit();</script></body></html>
  435. @cbind  gg<Google:>_         = uri http://www.google.com/search?q=\@<encodeURIComponent(%r)>\@
  436. @cbind  dd<DuckDuckGo:>_    = uri http://duckduckgo.com/?q=%s
  437. @cbind  \\awiki<Archwiki:>_  = uri http://wiki.archlinux.org/index.php/Special:Search?search=\@<encodeURIComponent(%r)>\@&go=Go
  438. @cbind  \\wiki<Wikipedia:>_  = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@<encodeURIComponent(%r)>\@&go=Go
  439. @cbind  wiki<Wikipedia:>_  = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@<encodeURIComponent(%r)>\@&go=Go
  440. #@cbind  gbt<bitorrent:>_  = uri http://idkwtf2putheresomanytorrentsyouknow...@<encodeURIComponent(%r)>\@&go=Go
  441. @cbing  db<imdb:>_  = uri http://imdb.com/@<encodeURIComponent(%r)>\@&go=Go
  442. @bind ee<seeks:>_  = uri http://tekk.com.ar/seeks/search.php/search?q=\@<encodeURIComponent(%r)>\@
  443.  
  444. # Handy binds
  445. # Set function shortcut
  446. @cbind  s<var:>_<value:>_  = set %1 = %2
  447. # Exit binding
  448. @cbind  ZZ                 = exit
  449. # Dump config to stdout
  450. @cbind  !dump              = sh 'echo dump_config > "$UZBL_FIFO"'
  451. # Reload all variables in the config
  452. @cbind  !reload            = sh "sed '/^# === Post-load misc commands/,$d' \"$UZBL_CONFIG\" | grep '^set ' > \"$UZBL_FIFO\""
  453.  
  454. # Use socat to directly inject commands into uzbl-core and view events
  455. # raised by uzbl-core:
  456. @cbind  <Ctrl><Alt>t  = sh 'xterm -e "socat unix-connect:\"$UZBL_SOCKET\" -"'
  457. #@cbind  <Ctrl><Alt>t  = sh 'urxvt -e socat unix-connect:"$UZBL_SOCKET" -'
  458.  
  459. # Uri opening prompts
  460. @cbind  o<uri:>_       = uri %s
  461. # Or have it load the current uri into the keycmd for editing
  462. @cbind  O<uri:\@uri>_  = uri %s
  463.  
  464. # Mode setting binds
  465. @cbind  i        = @set_mode insert
  466. @bind   <Ctrl>i  = @set_mode insert
  467.  
  468. # Hard-bound bookmarks
  469. @cbind  uz  = uri http://www.uzbl.org
  470. @cbind  dgb = uri http://digitsgnublog.tk
  471. @cbind  fi = uri http://fuge.it
  472. @cbind  wa = uri http://wastedartist.com
  473. @cbind  cb = uri http://crunchbanglinux.org/forums/
  474. @cbind  di = uri http://joindiaspora.com
  475. @cbind  en = uri http://next-episode.net
  476. @cbind  ey = uri http://educate-yourself.org
  477. @cbind  cs = uri http://www.couchsurfing.org
  478.  
  479. # New window binds
  480. @cbind  gw  = event REQ_NEW_WINDOW
  481.  
  482. # SSL-ify bindings
  483. @cbind  zs  = uri \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@
  484. @cbind  zS  = event REQ_NEW_WINDOW \@(echo "$UZBL_URI" | sed -e 's/^http:/https:/')\@
  485.  
  486. # Yanking & pasting binds
  487. @cbind  yu  = sh 'echo -n "$UZBL_URI" | xclip'
  488. @cbind  yU  = sh 'echo -n "$1" | xclip' \@SELECTED_URI
  489. @cbind  yy  = sh 'echo -n "$UZBL_TITLE" | xclip'
  490. @cbind  yi  = sh 'echo -n "$UZBL_URI" | xclip -selection clipboard'
  491.  
  492. # video yanking and dl
  493. @cbind  yT  = sh 'youtube-dl "$UZBL_URI"'
  494. @cbind  yr  = sh 'quvi "$UZBL_URI"'
  495. @cbind  yt  = sh 'youtube-dl "$UZBL_URI" | mv $f "$UZBL_TITLE"'
  496.  
  497. #video yanking and download to specific directories
  498. @cbind  dlvid  = sh 'cd cinema/Videos && youtube-dl "$UZBL_URI"'
  499. @cbind  dlani  = sh 'cd cinema/_anime && youtube-dl "$UZBL_URI"'
  500. @cbind  dlchi  = sh 'cd cinema/_Chi++ && youtube-dl "$UZBL_URI"'
  501. @cbind  dlcom  = sh 'cd cinema/_Comedy && youtube-dl "$UZBL_URI"'
  502. @cbind  dldoc  = sh 'cd cinema/_Documentarys\ Lectures\ etc && youtube-dl "$UZBL_URI"'
  503. @cbind  dlema  = sh 'cd cinema/_emancipationtech_bulk && youtube-dl "$UZBL_URI"'
  504. @cbind  dlfea  = sh 'cd cinema/_Features && youtube-dl "$UZBL_URI"'
  505. @cbind  dlher  = sh 'cd cinema/_herb && youtube-dl "$UZBL_URI"'
  506. @cbind  dlabu  = sh 'cd cinema/_abundance && youtube-dl "$UZBL_URI"'
  507. @cbind  dlmus  = sh 'cd cinema/_Music\ Videos && youtube-dl "$UZBL_URI"'
  508. @cbind  dlpor  = sh 'cd cinema/_Prawn && youtube-dl "$UZBL_URI"'
  509. @cbind  dlsci  = sh 'cd cinema/_scifiseries && youtube-dl "$UZBL_URI"'
  510. @cbind  dlsof  = sh 'cd cinema/_Software\ Tutorials && youtube-dl "$UZBL_URI"'
  511. @cbind  dlswf  = sh 'cd cinema/_nonvideoswf && youtube-dl "$UZBL_URI"'
  512. @cbind  clive  = sh 'clive "$UZBL_URI"'
  513. @cbind  clmv  = sh 'clive "$UZBL_URI" | mv $f "$UZBL_TITLE"'
  514. @cbind  clvid  = sh 'cd cinema/Videos && clive "$UZBL_URI"'
  515. @cbind  clani  = sh 'cd cinema/_anime && clive "$UZBL_URI"'
  516. @cbind  clchi  = sh 'cd cinema/_Chi++ && clive "$UZBL_URI"'
  517. @cbind  clcom  = sh 'cd cinema/_Comedy && clive "$UZBL_URI"'
  518. @cbind  cldoc  = sh 'cd cinema/_Documentarys\ Lectures\ etc && clive "$UZBL_URI"'
  519. @cbind  clema  = sh 'cd cinema/_emancipationtech_bulk && clive "$UZBL_URI"'
  520. @cbind  clfea  = sh 'cd cinema/_Features && clive "$UZBL_URI"'
  521. @cbind  clher  = sh 'cd cinema/_herb && clive "$UZBL_URI"'
  522. @cbind  clabu  = sh 'cd cinema/_abundance && clive "$UZBL_URI"'
  523. @cbind  clmus  = sh 'cd cinema/_Music\ Videos && clive "$UZBL_URI"'
  524. @cbind  clpor  = sh 'cd cinema/_Prawn && clive "$UZBL_URI"'
  525. @cbind  clsci  = sh 'cd cinema/_scifiseries && clive "$UZBL_URI"'
  526. @cbind  clsof  = sh 'cd cinema/_Software\ Tutorials && clive "$UZBL_URI"'
  527. @cbind  clswf  = sh 'cd cinema/_nonvideoswf && clive "$UZBL_URI"'
  528.  
  529. #batch downloader. see script's introductory comments for more info : http://www.uzbl.org/wiki/batch_downloader
  530. @cbind download = spawn @scripts_dir/batch_download.sh %s --download --dir=$HOME/downloads --confirm
  531.  
  532. # Clone current window
  533. #@cbind  c   = event REQ_NEW_WINDOW \@uri
  534. # Go the page from primary selection
  535. @cbind  p   = sh 'echo "uri $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
  536. # Go to the page in clipboard
  537. @cbind  P   = sh 'echo "uri $(xclip -selection clipboard -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
  538. # Start a new uzbl instance from the page in primary selection
  539. #@cbind  gp  = sh 'echo "event REQ_NEW_WINDOW $(xclip -o)" > "$UZBL_FIFO"'
  540. # paste primary selection into keycmd at the cursor position
  541. @bind <Shift-Insert> = sh 'echo "event INJECT_KEYCMD $(xclip -o | sed s/\\\@/%40/g)" > "$UZBL_FIFO"'
  542.  
  543. # Bookmark inserting binds
  544. @cbind <Ctrl>b<tags:>_  = sh 'echo `printf "$UZBL_URI %s"` >> "$XDG_DATA_HOME"/uzbl/bookmarks'
  545. # Or use a script to insert a bookmark.
  546. @cbind  B  = spawn @scripts_dir/insert_bookmark.sh
  547.  
  548. # Bookmark/history/queue loading
  549. #@cbind  U  = spawn @scripts_dir/load_url_from_history.sh
  550. #@cbind  u  = spawn @scripts_dir/load_url_from_bookmarks.sh
  551. #@cbind  H  = spawn @scripts_dir/pi_history.sh
  552. #@bind  B  = spawn @scripts_dir/load_url_from_bookmarks.sh
  553. @cbind    qpu             = spawn @scripts_dir/article_queue.py push
  554. @cbind    qpo             = spawn @scripts_dir/article_queue.py pop
  555. @cbind    qp _            = spawn @scripts_dir/article_queue.py pop %s
  556. @cbind    qap             = spawn @scripts_dir/article_queue.py append
  557. @cbind    qsh             = spawn @scripts_dir/article_queue.py shift
  558. @cbind    q>              = spawn @scripts_dir/article_queue.py forward
  559. @cbind    q<              = spawn @scripts_dir/article_queue.py back
  560. @cbind    ql              = spawn @scripts_dir/article_queue.py list
  561.  
  562.  
  563.  
  564. # Link following (similar to vimperator and konqueror)
  565. # Set custom keys you wish to use for navigation. Some common examples:
  566. set follow_hint_keys = 0123456789
  567. #set follow_hint_keys = qwerty
  568. #set follow_hint_keys = asdfghjkl;
  569. #set follow_hint_keys = thsnd-rcgmvwb/;789aefijkopquxyz234
  570. @cbind  fl*  = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 0) >\@
  571. @cbind  Fl*  = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 1) >\@
  572. #@cbind  fi   = spawn @scripts_dir/go_input.sh
  573.  
  574. # Form filler binds
  575. # This script allows you to configure (per domain) values to fill in form
  576. # fields (eg login information) and to fill in these values automatically.
  577. # This implementation allows you to save multiple profiles for each form
  578. # (think about multiple accounts on some website).
  579. set formfiller = spawn @scripts_dir/formfiller.sh
  580. @cbind  za  = @formfiller add
  581. @cbind  ze  = @formfiller edit
  582. @cbind  zn  = @formfiller new
  583. @cbind  zl  = @formfiller load
  584.  
  585. # --- toggle commands -----------------------------
  586.  
  587. # you can give the command a list of values to toggle between
  588. # this keybinding will enable/disable a proxy
  589. #@cbind -pr = toggle proxy_url 'http://localhost:8123/' ''
  590.  
  591. # if you have several proxies you could cycle between them by passing more
  592. # urls to the command.
  593.  
  594.  
  595. #toggle style
  596. @cbind  <Ctrl>y   = toggle stylesheet_uri 'file://@config_home/uzbl/styles/lexi000.css' '' 'file://@config_home/uzbl/styles/rowan-9.0.css' 'file://@config_home/uzbl/styles/clearintent.css' 'file://@config_home/uzbl/styles/bird.css'
  597. ##'file://usr/share/xxxterm/style.css'
  598.  
  599. #toggle scripts
  600. #there is already an old toggle scripts, but this section has been put here to pre-empt inclusion of more per-script based toggles
  601.  
  602. # --- Uzbl tabbed binds ------------------------------------------------------
  603.  
  604. # Tab opening
  605. @cbind  gn              = event NEW_TAB
  606. @cbind  gN              = event NEW_TAB_NEXT
  607. @cbind  go<uri:>_       = event NEW_TAB %s
  608. @cbind  gO<uri:>_       = event NEW_TAB_NEXT %s
  609. @cbind  gY              = sh 'echo "event NEW_TAB `xclip -selection primary -o | sed s/\\\@/%40/g`" > $4'
  610.  
  611. # Closing / resting
  612. @cbind  gC              = exit
  613. @cbind  gQ              = event CLEAN_TABS
  614.  
  615. # Tab navigating
  616. @cbind  g<              = event FIRST_TAB
  617. @cbind  g>              = event LAST_TAB
  618. @cbind  gt              = event NEXT_TAB
  619. @cbind  gT              = event PREV_TAB
  620. @cbind  gi<index:>_     = event GOTO_TAB %s
  621.  
  622. # Preset loading
  623. set preset = event PRESET_TABS
  624. @cbind  gs<preset save:>_   = @preset save %s
  625. @cbind  glo<preset load:>_  = @preset load %s
  626. @cbind  gd<preset del:>_    = @preset del %s
  627.  
  628. #they say this doesnt work right now
  629. #@cbind  gli                 = @preset list
  630.  
  631. # === Context menu items =====================================================
  632.  
  633. # Default context menu
  634. menu_add seeks = set uri = http://tekk.com.ar/seeks
  635. menu_add seeks node list = set uri = http://seeks-project.info/wiki/index.php/List_of_Web_Seeks_nodes
  636. menu_add Google = set uri = http://google.com
  637. menu_add omp = set uri = http://ompldr.org/big
  638. menu_add Go Home = set uri = http://uzbl.org
  639. menu_add uzbl scripts = set uri = http://www.uzbl.org/wiki/scripts
  640. menu_add dlb = set uri = http://digitslinuxblog.blogspot.com/
  641. menu_add wastedartist = set uri = http://wastedartist.com
  642. menu_add facebook = set uri = http://www.facebook.com
  643. menu_separator separator_1
  644. menu_add pioneer = set uri = http://www.spacesimcentral.com/forum/viewforum.php?f=35
  645. menu_separator separator_1
  646. menu_add 1channel dot ch = set uri = http://1channel.ch/?tv
  647. menu_add sidereel = set uri = http://www.sidereel.com
  648. menu_add ipt = set uri = http://www.iptorrents.ru
  649. menu_add tpb = set uri = http://www.thepiratebay.com
  650. menu_separator separator_1
  651. menu_add gentoo forum = set uri = http://forum.gentoo.org
  652. #menu_add ipt = set uri = http://icmag.org
  653. menu_add couchsurfing = set uri = http://www.couchsurfing.org
  654. #add more forums dickwadd!
  655. menu_separator separator_1
  656. menu_add Keybindings = spawn @scripts_dir/show_keybindings.sh "Group"
  657. menu_separator separator_1
  658. menu_add scripts off = disable_scripts = 1
  659. menu_add scripts on = disable_scripts = 0
  660. menu_separator separator_1
  661. menu_add clear cookies = exec ~/bin/ckiall
  662. menu_add clear main cookies = exec ~/bin/ckiurgent
  663. #menu_add Quit uzbl = exit
  664.  
  665. # Link context menu
  666. menu_link_add Print Link = print \@SELECTED_URI
  667. menu_link_add suck mah dick =
  668.  
  669. # === Mode configuration =====================================================
  670.  
  671. # Define some mode specific uzbl configurations.
  672. set command  = @mode_config command
  673. set insert   = @mode_config insert
  674. set stack    = @mode_config stack
  675.  
  676. # Command mode config.
  677. @command  keycmd_style        = foreground="red"
  678. @command  status_background   = #450029
  679. @command  mode_indicator      = Cmd
  680. @command  keycmd_events       = 1
  681. @command  forward_keys        = 0
  682. @command  modcmd_updates      = 1
  683.  
  684. # Insert mode config.
  685. @insert   status_background   = #fa0
  686. @insert   mode_indicator      = Ins
  687. @insert   forward_keys        = 1
  688. @insert   keycmd_events       = 0
  689. @insert   modcmd_updates      = 0
  690.  
  691. # Multi-stage-binding mode config.
  692. @stack    status_background   = #425719
  693. @stack    keycmd_events       = 1
  694. @stack    modcmd_updates      = 1
  695. @stack    forward_keys        = 0
  696. @stack    keycmd_style        = foreground="red"
  697. @stack    prompt_style        = foreground="#888" weight="light"
  698. @stack    mode_indicator      = Bnd
  699.  
  700. set default_mode = command
  701.  
  702. # === Post-load misc commands ================================================
  703.  
  704. sync_spawn_exec @scripts_dir/load_cookies.sh
  705. sync_spawn_exec @scripts_dir/load_cookies.sh @data_home/uzbl/session-cookies.txt
  706.  
  707. # Set the "home" page.
  708. #set uri = uzbl.org/doesitwork/@COMMIT
  709. #set uri = http://wastedartist.com/distros/witch/witch.html
  710. set uri = http://www.cannabiscollege.com/contactus.html
  711.  
  712. # vim: set fdm=syntax:
  713.  
  714.  
  715. # === Digit is a Genius, for thinking of 9menu. ================================================
  716.  
  717. @cbind  m = spawn @scripts_dir/brsrmnu
  718. # ====and will be a bigger one once he gets 9menu working as cool as dmenu, like with dm-dm type stuff on the go.
  719.  
  720. # === dm-dm stuff (dmenu download manager) ===================================
  721.  
  722. #set home_bin         = /home/bin
  723.  
  724. #set scripts_dir      = @home_bin[:morepathsaddhere]
  725.  
  726. set dm_dm_start      = dm-dm.sh -s
  727.  
  728. #set already at start.
  729. #set download_handler = spawn @dm_dm_start
  730.  
  731. @cbind !downloads    = sh 'dm-dm.sh g'
  732.  
  733. # === Firefox-like Additional Comands - uncoment as needed ================================================
  734.  
  735. #newtab/window
  736. @bind <Ctrl>t = event REQ_NEW_WINDOW
  737.  
  738. #close window
  739. @cbind <Ctrl>w = exit
  740.  
  741. #close all uzbls
  742. @bind <Ctrl>q = exec pkill uzbl
  743.  
  744. #bookmarks
  745. @bind <Ctrl>d = spawn @scripts_dir/insert_bookmark.sh
  746. @cbind <Ctrl>D = spawn @scripts_dir/load_url_from_bookmarks.sh
  747.  
  748. #@bind <Ctrl>k =
  749. # Web searching binds
  750. #@bind <Ctrl>k<scroogle:>_       = uri http://www.scroogle.org/cgi-bin/scraper.htm/search?q=\@<encodeURIComponent(%r)>\@
  751. @bind <Ctrl>k<scroogle:>_       = uri http://www.scroogle.org/cgi-bin/scraper.htm/search?q=%s
  752. #@bind <Ctrl>k<Google:>_         = uri http://www.google.com/search?q=\@<encodeURIComponent(%r)>\@
  753. #@bind <Ctrl>k<DuckDuckGo:>_    = uri http://duckduckgo.com/?q=%s
  754. #@bind <Ctrl>k<Archwiki:>_  = uri http://wiki.archlinux.org/index.php/Special:Search?search=\@<encodeURIComponent(%r)>\@&go=Go
  755. #@bind <Ctrl>k<Wikipedia:>_  = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@<encodeURIComponent(%r)>\@&go=Go
  756.  
  757. #search for string of text, aka find.
  758. #@cbind  <Ctrl>f*  = search %s
  759. #aw... couldnt get that to work like that with ctrl. ^
  760. #@cbind  f*  = search %s
  761.  
  762.  
  763. # Uri opening prompts
  764. @bind <Ctrl>l<uri:\@uri>_  = uri %s
  765.  
  766. # Or have it load the current uri into the keycmd for editing
  767. #@bind <Ctrl>l<uri:>_       = uri %s
  768. # using shift
  769. @bind <Ctrl>L<uri:>_       = uri %s
  770.  
  771. #reminder
  772. #rebind cursor keys to do same as hjkl do, in uzbl, for greater foxability.
  773. @cbind  <down>       = scroll vertical 20
  774. @cbind  <up>         = scroll vertical -20
  775. @cbind  <left>       = scroll horizontal -20
  776. @cbind  <right>      = scroll horizontal 20

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me