• You are not logged in.

    Colemak configuration for the uzbl browser

    • Started by jrick
    • 1 Replies:
    • Reputation: 0
    • From: Ann Arbor, MI
    • Registered: 25-Sep-2008
    • Posts: 36

    Just today I discovered the uzbl browser on #colemak.  After a few minutes of using it, I came to realize that this is just about the browser for UNIX.  The default configuration was quite QWERTY-centric, so here is my own Colemak-optimized config:

    # example uzbl config. in a real config, we should obey the xdg spec
    # all settings are optional.  you can use uzbl without any config at all (but it won't do much)
    
    # 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
    
    # TODO: ability to attach misc things (spawn <foo>, script <bar>,.. to internal events)
    # You can use any action in place of spawn
    set history_handler  = spawn /usr/local/share/uzbl/examples/scripts/history.sh
    set download_handler = spawn /usr/local/share/uzbl/examples/scripts/download.sh
    #set cookie_handler   = spawn /usr/share/uzbl/examples/scripts/cookies.sh
    
    set minimum_font_size = 6
    set font_size = 12
    # monospace_size defaults to font_size, but you can alter it independently
    set monospace_size = 10
    
    # use with bind ... = sh <shell-oneliner>
    set shell_cmd         = zsh -c
    
    
    
    # Behaviour and appearance
    set show_status       = 1
    # you can optionally use this setting to override the background color of the statusbar from your GTK theme.
    set status_background = #222222
    set status_format     = <span font_family="terminus"><span background="#535d6c" foreground="#ffffff">MODE</span> <span foreground="#aaaaaa">[</span><span foreground="red">KEYCMD</span><span foregroun
    d="#aaaaaa">]</span> <span foreground="#606060"> LOAD_PROGRESSBAR </span><span foreground="#99FF66">URI</span> <span foreground="khaki">NAME</span> <span foreground="orange">MSG</span><span foregroun
    d="#606060">SELECTED_URI</span></span>
    set status_top = 0
    # define how your titlebar should look like. (short = statusbar is also shown, long = show everything you must see if statusbar is off)
    set title_format_short = TITLE - Uzbl browser <NAME>
    set title_format_long = KEYCMD MODE TITLE - Uzbl browser <NAME> > SELECTED_URI
    # set the characters to use for, and the width of the progress bar
    set status_pbar_done  = *
    set status_pbar_pending = -
    set status_pbar_width = 12
    
    set modkey = Mod1
    # reset to command mode when new page is loaded
    set reset_command_mode = 1
    # this var has precedence over reset_command_mode
    set always_insert_mode = 0
    # to start a local socks server, do : ssh -fND localhost:8118 localhost
    #set  proxy_url       = http://127.0.0.1:8118
    #values 0-3
    #set  http_debug      = 0
    #set  useragent       = uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO)
    # Example user agent containing everything:
    set  useragent       = Uzbl (Webkit WEBKIT_MAJOR.WEBKIT_MINOR.WEBKIT_MICRO) (SYSNAME NODENAME KERNREL KERNVER ARCH_SYSTEM [ARCH_UZBL]) (Commit COMMIT)
    #set  max_conns       = 0
    #set  max_conns_host  = 0
    
    set fifo_dir = /tmp
    set socket_dir = /tmp
    
    # Key bindings
    bind    e         = scroll_vert 20
    bind    i         = scroll_vert -20
    bind    n         = scroll_horz -20
    bind    o         = scroll_horz 20
    bind    <<        = scroll_begin
    bind    >>        = scroll_end
    bind    N         = back
    bind    O         = forward
    bind    x         = stop
    bind    r         = reload
    bind    R         = reload_ign_cache
    bind    +         = zoom_in
    bind    -         = zoom_out
    bind    t         = toggle_status
    # Hilight matches. Notice the * after the slash - it makes the command incremental, i.e. gets called
    # on every character you type.  You can do `bind /_ = search %s' if you want it less interactive.
    bind    /*        = search %s
    bind    ?*        = search_reverse %s
    #jump to next
    bind    t         = search
    bind    T         = search_reverse
    bind    gh        = uri http://www.uzbl.org
    #TODO: set uri?
    bind    g _       = uri %s
    bind    :wiki _   = uri https://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
    bind    s _       = uri http://www.google.com/search?q=%s
    bind    h         = toggle_insert_mode
    # disable insert mode (1 to enable).  note that Esc works to disable, regardless of this setting
    bind    H         = toggle_insert_mode 0
    bind    B         = spawn /usr/local/share/uzbl/examples/scripts/insert_bookmark.sh
    bind    U         = spawn /usr/local/share/uzbl/examples/scripts/load_url_from_history.sh
    bind    u         = spawn /usr/local/share/uzbl/examples/scripts/load_url_from_bookmarks.sh
    # with the sample yank script, you can yank one of the arguments into clipboard/selection
    bind    yurl      = spawn /usr/local/share/uzbl/examples/scripts/yank.sh 8 primary
    bind    ytitle    = spawn /usr/local/share/uzbl/examples/scripts/yank.sh 9 clipboard
    # does the same as yurl but without needing a script
    bind    y2url     = sh "echo -n $6 | xclip"
    # go the page from primary selection
    bind    p         = sh "echo act uri `xclip -selection primary -o` > $4"
    # go to the page in clipboard
    bind    P         = sh "echo act uri `xclip -selection clipboard -o` > $4"
    bind    ZZ        = exit
    bind    S         = js alert("hi");
    # it sends a command to the fifo, whose path is told via a positional param
    # if fifo_dir is not set, it'll echo to a file named (null) somewhere >:) remember to delete it
    # Parameters are separated by spaces and the script body must be one parameter, so enclose it in
    # quotes and escape any inner quotes using backslashes
    bind    XS        = sh 'echo "act script alert (\'This is sent by the shell via a fifo\')" > "$4"'
    
    
    # we ship some javascripts to do keyboard based link hinting/following.  (webkit does not have C DOM bindings yet)
    # this is similar to how it works in vimperator (and konqueror)
    # TODO: did we resolve: "no click() event for hyperlinks so no referrer set" ?
    #hit F to toggle the Hints (now in form of link numbering)
    bind    F = script /usr/local/share/uzbl/examples/scripts/hint.js
    # the most stable version:
    bind    fl* = script /usr/local/share/uzbl/examples/scripts/follow_Numbers.js %s
    # using strings, not polished yet:
    bind    fL* = script /usr/local/share/uzbl/examples/scripts/follow_Numbers_Strings.js %s
    
    
    # "home" page if you will
    set uri = uzbl.org

    The keybindings should be pretty explanatory.  Please note that I had to modify the Makefile when I installed it so that it worked with FreeBSD, so I have everything installed in /usr/local instead of just /usr. I also changed the theme so that it matched the default awesome theme as well.

    Offline
    • 0
    • Reputation: 0
    • Registered: 09-Oct-2009
    • Posts: 23

    And here's mine, influenced by my Vim keymap:
    https://github.com/TaylanUB/misc/blob/m … zbl/config

    One should be careful with Uzbl config files since breaking compatibility is one of the main features of Uzbl. :P

    ``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
    ~ Albert Einstein

    Offline
    • 0