# Behaviour and appearance
-SET show_status = 1
-SET status_background = #303030
-SET status_format = <span font_family="monospace"><span background="khaki" foreground="black">MODE</span> [<span weight="bold" foreground="red">KEYCMD</span>] <span foreground="#606060"> LOAD_PROGRESSBAR </span><span foreground="#99FF66">URI</span> <span foreground="khaki">NAME</span> <span foreground="orange">MSG</span></span>
+set show_status = 1
+set status_background = #303030
+set status_format = <span font_family="monospace"><span background="khaki" foreground="black">MODE</span> [<span weight="bold" foreground="red">KEYCMD</span>] <span foreground="#606060"> LOAD_PROGRESSBAR </span><span foreground="#99FF66">URI</span> <span foreground="khaki">NAME</span> <span foreground="orange">MSG</span></span>
# Key bindings
-BIND j = scroll_vert 20
-BIND k = scroll_vert -20
-BIND h = scroll_horz -20
-BIND l = scroll_horz 20
-BIND b = back
-BIND m = forward
-BIND s = stop
-BIND r = reload
-BIND R = reload_ign_cache
-BIND + = zoom_in
-BIND - = zoom_out
-BIND t = toggle_status
-BIND /_ = search %s
-BIND ; = search
-BIND gh = uri http://www.uzbl.org
-BIND o _ = uri %s
-BIND :wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
-BIND gg _ = uri http://www.google.com/search?q=%s
-BIND i = insert_mode
-BIND B = spawn ./examples/scripts/insert_bookmark.sh
-BIND u = spawn ./examples/scripts/load_url_from_history.sh
-BIND U = spawn ./examples/scripts/load_url_from_bookmarks.sh
-BIND ZZ = exit
-BIND S = script alert("hi");
-BIND F= script for (var i=0; i < document.links.length; i++) {var uzblid = 'uzbl_link_hint_';var li = document.links[i];var pre = document.getElementById(uzblid+i);if (pre) {li.removeChild(pre);} else {var hint = document.createElement('div');hint.setAttribute('id',uzblid+i);hint.innerHTML = i;hint.style.display='inline';hint.style.lineHeight='90%';hint.style.backgroundColor='red';hint.style.color='white';hint.style.fontSize='small-xx';hint.style.fontWeight='light';hint.style.margin='0px';hint.style.padding='2px';hint.style.position='absolute';hint.style.textDecoration='none';hint.style.left=li.style.left;hint.style.top=li.style.top;li.insertAdjacentElement('afterBegin',hint);}}
-BIND f_ = script window.location = document.links[%s].href;
+bind j = scroll_vert 20
+bind k = scroll_vert -20
+bind h = scroll_horz -20
+bind l = scroll_horz 20
+bind b = back
+bind m = forward
+bind s = stop
+bind r = reload
+bind R = reload_ign_cache
+bind + = zoom_in
+bind - = zoom_out
+bind t = toggle_status
+bind /_ = search %s
+bind ; = search
+bind gh = uri http://www.uzbl.org
+bind o _ = uri %s
+bind :wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
+bind gg _ = uri http://www.google.com/search?q=%s
+bind i = insert_mode
+bind B = spawn ./examples/scripts/insert_bookmark.sh
+bind u = spawn ./examples/scripts/load_url_from_history.sh
+bind U = spawn ./examples/scripts/load_url_from_bookmarks.sh
+bind ZZ = exit
+bind S = script alert("hi");
+bind F= script for (var i=0; i < document.links.length; i++) {var uzblid = 'uzbl_link_hint_';var li = document.links[i];var pre = document.getElementById(uzblid+i);if (pre) {li.removeChild(pre);} else {var hint = document.createElement('div');hint.setAttribute('id',uzblid+i);hint.innerHTML = i;hint.style.display='inline';hint.style.lineHeight='90%';hint.style.backgroundColor='red';hint.style.color='white';hint.style.fontSize='small-xx';hint.style.fontWeight='light';hint.style.margin='0px';hint.style.padding='2px';hint.style.position='absolute';hint.style.textDecoration='none';hint.style.left=li.style.left;hint.style.top=li.style.top;li.insertAdjacentElement('afterBegin',hint);}}
+bind f_ = script window.location = document.links[%s].href;
setup_regex() {
GError *err=NULL;
- uzbl.comm.get_regex = g_regex_new("^GET\\s+([^ \\n]+)$",
+ uzbl.comm.get_regex = g_regex_new("^[Gg][a-zA-Z]*\\s+([^ \\n]+)$",
G_REGEX_OPTIMIZE, 0, &err);
- uzbl.comm.set_regex = g_regex_new("^SET\\s+([^ ]+)\\s*=\\s*([^\\n].*)$",
+ uzbl.comm.set_regex = g_regex_new("^[Ss][a-zA-Z]*\\s+([^ ]+)\\s*=\\s*([^\\n].*)$",
G_REGEX_OPTIMIZE, 0, &err);
- uzbl.comm.bind_regex = g_regex_new("^BIND\\s+?(.*[^ ])\\s*?=\\s*([a-z][^\\n].+)$",
+ uzbl.comm.bind_regex = g_regex_new("^[Bb][a-zA-Z]*\\s+?(.*[^ ])\\s*?=\\s*([a-z][^\\n].+)$",
G_REGEX_UNGREEDY|G_REGEX_OPTIMIZE, 0, &err);
}
static gboolean
gchar **tokens;
/* SET command */
- if(ctl_line[0] == 'S') {
+ if(ctl_line[0] == 's' || ctl_line[0] == 'S') {
tokens = g_regex_split(uzbl.comm.set_regex, ctl_line, 0);
if(tokens[0][0] == 0) {
set_var_value(tokens[1], tokens[2]);
printf("Error in command: %s\n", tokens[0]);
}
/* GET command */
- else if(ctl_line[0] == 'G') {
+ else if(ctl_line[0] == 'g' || ctl_line[0] == 'G') {
tokens = g_regex_split(uzbl.comm.get_regex, ctl_line, 0);
if(tokens[0][0] == 0) {
get_var_value(tokens[1]);
printf("Error in command: %s\n", tokens[0]);
}
/* BIND command */
- else if(ctl_line[0] == 'B') {
+ else if(ctl_line[0] == 'b' || ctl_line[0] == 'B') {
tokens = g_regex_split(uzbl.comm.bind_regex, ctl_line, 0);
if(tokens[0][0] == 0) {
add_binding(tokens[1], tokens[2]);