aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Mason Larobina <mason.larobina@gmail.com>2010-01-09 13:51:33 +0800
committerGravatar Mason Larobina <mason.larobina@gmail.com>2010-01-09 13:51:33 +0800
commitc8622b2b0e3b693568e87eac5515719d410c413a (patch)
tree6af83cf935abe1fe046b6eb9800bd46402ec7eba /examples
parent4af65d57a6b432a8078bf57a4de9660aac8131aa (diff)
parent36029e1faf0761607e3192fb4968f3228d84af9f (diff)
Merge branch 'master' into experimental
Diffstat (limited to 'examples')
-rw-r--r--examples/config/config12
-rwxr-xr-xexamples/data/scripts/uzbl-event-manager8
2 files changed, 10 insertions, 10 deletions
diff --git a/examples/config/config b/examples/config/config
index eb17813..2a18a57 100644
--- a/examples/config/config
+++ b/examples/config/config
@@ -35,7 +35,7 @@ set shell_cmd = sh -c
set scripts_dir = $XDG_DATA_HOME/uzbl:@prefix/share/uzbl/examples/data:scripts
# Javascipt helpers.
-set jsh = js var run=Uzbl.run; function get(k){return run("print \\\@"+k)}; function set(k, v) {run("set "+k+" = "+v)};
+#set jsh = js var run=Uzbl.run; function get(k){return run("print \\\@"+k)}; function set(k, v) {run("set "+k+" = "+v)};
# === Handlers ===============================================================
@@ -71,7 +71,7 @@ set new_window = sh 'uzbl-browser -u $8'
# Generate a FORM_ACTIVE event if an editable
# element on the loaded site has initial focus
-@on_event LOAD_FINISH js if(document.activeElement.type == 'text') {Uzbl.run("event FORM_ACTIVE");}
+#@on_event LOAD_FINISH js if(document.activeElement.type == 'text') {Uzbl.run("event FORM_ACTIVE");}
# Switch to insert mode if a (editable) html form is clicked
@on_event FORM_ACTIVE @set_mode insert
@@ -192,9 +192,9 @@ set ebind = @mode_bind global,-insert
# Middle click
# if clicked on a link open the link in a new uzbl window
# otherwise open the selection in the current window
-set load_from_xclip = sh 'echo "uri $(xclip -o)" > $4'
-set open_new_window = sh 'uzbl-browser -u \@SELECTED_URI'
-@bind <Button2> = @jsh if(get("SELECTED_URI")) { run("\@open_new_window"); } else { run("\\\@load_from_xclip"); }
+#set load_from_xclip = sh 'echo "uri $(xclip -o)" > $4'
+#set open_new_window = sh 'uzbl-browser -u \@SELECTED_URI'
+#@bind <Button2> = @jsh if(get("SELECTED_URI")) { run("\@open_new_window"); } else { run("\\\@load_from_xclip"); }
# === Keyboard bindings ======================================================
@@ -276,7 +276,7 @@ set toggle_cmd_ins = @toggle_modes command insert
@cbind gh = uri http://www.uzbl.org
# --- Yanking & pasting binds ---
-@cbind y<Yank (t)itle or (u)rl:>* = @jsh if('%s' == 'u') { run("sh 'echo -n $6 | xclip'"); } else if('%s' == 't') { run("sh 'echo -n $7 | xclip'"); }; run('event SET_KEYCMD');
+#@cbind y<Yank (t)itle or (u)rl:>* = @jsh if('%s' == 'u') { run("sh 'echo -n $6 | xclip'"); } else if('%s' == 't') { run("sh 'echo -n $7 | xclip'"); }; run('event SET_KEYCMD');
# Go the page from primary selection
@cbind p = sh 'echo "uri `xclip -selection primary -o`" > $4'
diff --git a/examples/data/scripts/uzbl-event-manager b/examples/data/scripts/uzbl-event-manager
index 99b215a..a92485f 100755
--- a/examples/data/scripts/uzbl-event-manager
+++ b/examples/data/scripts/uzbl-event-manager
@@ -295,7 +295,7 @@ def parse_msg(uzbl, msg):
cmd = FINDSPACES.split(msg, 3)
if not cmd or cmd[0] != 'EVENT':
# Not an event message.
- print '---', msg
+ print '---', msg.encode('utf-8')
return
while len(cmd) < 4:
@@ -374,11 +374,11 @@ class UzblInstance(object):
msg = msg.strip()
if self.client_socket:
- print '%s<-- %s' % (' ' * self.depth, msg)
+ print (u'%s<-- %s' % (' ' * self.depth, msg)).encode('utf-8')
self.client_socket.send(("%s\n" % msg).encode('utf-8'))
else:
- print '%s!-- %s' % (' ' * self.depth, msg)
+ print (u'%s!-- %s' % (' ' * self.depth, msg)).encode('utf-8')
def export(self, name, function):
@@ -466,7 +466,7 @@ class UzblInstance(object):
elems = [event,]
if args: elems.append(unicode(args))
if kargs: elems.append(unicode(kargs))
- print "%s--> %s" % (' ' * self.depth, ' '.join(elems))
+ print (u'%s--> %s' % (' ' * self.depth, ' '.join(elems))).encode('utf-8')
if event == "INSTANCE_START" and args:
self.pid = int(args[0])