From 5309b7fed7a7444d1532ba57254493f9d13ea640 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 5 Jan 2010 19:17:50 +0800 Subject: You need to `cd uzbl` before running checkout. --- docs/INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/INSTALL b/docs/INSTALL index 711ea97..c795502 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -9,8 +9,8 @@ From source You can pull the code from git or get a tagged tarball. $ git clone git://github.com/Dieterbe/uzbl.git - [ $ git checkout origin/experimental ] # optional. see below $ cd uzbl + [ $ git checkout origin/experimental ] # optional. see below $ make $ sudo make install If you want to remove uzbl again, you can issue: -- cgit v1.2.3 From 7a0a558cf745fa57a9db92216f98be2a80de6adc Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 5 Jan 2010 22:15:18 +0800 Subject: Make verbose print format string unicode. --- examples/data/uzbl/scripts/uzbl-event-manager | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/data/uzbl/scripts/uzbl-event-manager b/examples/data/uzbl/scripts/uzbl-event-manager index afef6fd..2b0ac33 100755 --- a/examples/data/uzbl/scripts/uzbl-event-manager +++ b/examples/data/uzbl/scripts/uzbl-event-manager @@ -375,11 +375,11 @@ class UzblInstance(object): msg = msg.strip() if self.client_socket: - print '%s<-- %s' % (' ' * self.depth, msg) + print u'%s<-- %s' % (' ' * self.depth, msg) self.client_socket.send(("%s\n" % msg).encode('utf-8')) else: - print '%s!-- %s' % (' ' * self.depth, msg) + print u'%s!-- %s' % (' ' * self.depth, msg) def export(self, name, function): @@ -467,7 +467,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)) if event == "INSTANCE_START" and args: self.pid = int(args[0]) -- cgit v1.2.3 From 585226c1cb80488f1fbd4ad2635550a728bf2747 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 5 Jan 2010 23:06:21 +0800 Subject: Encode utf-8 strings being sent to stdout. --- examples/data/uzbl/scripts/uzbl-event-manager | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/data/uzbl/scripts/uzbl-event-manager b/examples/data/uzbl/scripts/uzbl-event-manager index 2b0ac33..2df3357 100755 --- a/examples/data/uzbl/scripts/uzbl-event-manager +++ b/examples/data/uzbl/scripts/uzbl-event-manager @@ -296,7 +296,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: @@ -375,11 +375,11 @@ class UzblInstance(object): msg = msg.strip() if self.client_socket: - print u'%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 u'%s!-- %s' % (' ' * self.depth, msg) + print (u'%s!-- %s' % (' ' * self.depth, msg)).encode('utf-8') def export(self, name, function): @@ -467,7 +467,7 @@ class UzblInstance(object): elems = [event,] if args: elems.append(unicode(args)) if kargs: elems.append(unicode(kargs)) - print u'%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]) -- cgit v1.2.3 From 36029e1faf0761607e3192fb4968f3228d84af9f Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Sat, 9 Jan 2010 13:47:54 +0800 Subject: Comment out anything in the config that used @jsh or the Uzbl object. --- examples/config/uzbl/config | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config index 3edb36c..e53dd1a 100644 --- a/examples/config/uzbl/config +++ b/examples/config/uzbl/config @@ -35,7 +35,7 @@ set shell_cmd = sh -c set scripts_dir = $XDG_DATA_HOME/uzbl:@prefix/share/uzbl/examples/data/uzbl: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 = @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 = @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* = @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* = @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' -- cgit v1.2.3 From c6756f9373b837aa3ff499f1e6bd7477d0eec361 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Mon, 11 Jan 2010 20:05:32 +0800 Subject: Fix yank bind now that the Uzbl object is gone. --- examples/config/uzbl/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config index e53dd1a..2832505 100644 --- a/examples/config/uzbl/config +++ b/examples/config/uzbl/config @@ -276,7 +276,8 @@ set toggle_cmd_ins = @toggle_modes command insert @cbind gh = uri http://www.uzbl.org # --- Yanking & pasting binds --- -#@cbind y* = @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 yu = sh 'echo -n $6 | xclip' +@cbind yy = sh 'echo -n $7 | xclip' # Go the page from primary selection @cbind p = sh 'echo "uri `xclip -selection primary -o`" > $4' -- cgit v1.2.3 From 579c60242c8054659482443f95c6e13a79807843 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Wed, 13 Jan 2010 16:14:20 +0800 Subject: Fix middle click binding (to open selected uri in new window). --- examples/config/uzbl/config | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config index 2832505..6843804 100644 --- a/examples/config/uzbl/config +++ b/examples/config/uzbl/config @@ -189,12 +189,8 @@ set ebind = @mode_bind global,-insert # === Mouse bindings ========================================================= -# 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 = @jsh if(get("SELECTED_URI")) { run("\@open_new_window"); } else { run("\\\@load_from_xclip"); } +# Middle click open in new window +@bind = sh 'uzbl-browser -u \@SELECTED_URI' # === Keyboard bindings ====================================================== -- cgit v1.2.3