diff options
-rw-r--r-- | examples/config/config | 7 | ||||
-rwxr-xr-x | examples/data/scripts/uzbl-tabbed | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/examples/config/config b/examples/config/config index cd6a0c0..150d1ea 100644 --- a/examples/config/config +++ b/examples/config/config @@ -235,7 +235,9 @@ set ebind = @mode_bind global,-insert # --- Uzbl tabbed binds --- # Tab opening @cbind gn = event NEW_TAB +@cbind gN = event NEW_TAB_NEXT @cbind go<uri:>_ = event NEW_TAB %s +@cbind gO<uri:>_ = event NEW_TAB_NEXT %s @cbind gY = sh 'echo "event NEW_TAB `xclip -selection primary -o`" > $4' # Closing / resting @cbind gC = exit @@ -347,6 +349,11 @@ set external_editor = gvim # === Context menu items ===================================================== # Default context menu +menu_link_add Open in Tab = event NEW_TAB \@SELECTED_URI +menu_link_add Open in Next Tab = event NEW_TAB_NEXT \@SELECTED_URI +menu_link_add Open in BG Tab = event NEW_BG_TAB \@SELECTED_URI +menu_link_add Open in Next BG Tab = event NEW_BG_TAB_NEXT \@SELECTED_URI +menu_separator separator_1 menu_add Google = set uri = http://google.com menu_add Go Home = set uri = http://uzbl.org menu_separator separator_1 diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed index ea130f5..f07bae4 100755 --- a/examples/data/scripts/uzbl-tabbed +++ b/examples/data/scripts/uzbl-tabbed @@ -489,6 +489,13 @@ class UzblInstance: self.parent.update_tablist() elif type == "NEW_TAB": self.parent.new_tab(args) + elif type == "NEW_BG_TAB": + self.parent.new_tab(args, '', 0) + elif type == "NEW_TAB_NEXT": + self.parent.new_tab(args, next=True) + elif type == "NEW_BG_TAB_NEXT": + self.parent.new_tab(args, '', 0, next=True) + elif type == "NEXT_TAB": if args: self.parent.next_tab(int(args)) @@ -979,7 +986,7 @@ class UzblTabbed: return False - def new_tab(self, uri='', title='', switch=None): + def new_tab(self, uri='', title='', switch=None, next=False): '''Add a new tab to the notebook and start a new instance of uzbl. Use the switch option to negate config['switch_to_new_tabs'] option when you need to load multiple tabs at a time (I.e. like when @@ -987,7 +994,7 @@ class UzblTabbed: tab = gtk.Socket() tab.show() - self.notebook.append_page(tab) + self.notebook.insert_page(tab, position=next and self.notebook.get_current_page() + 1 or -1) sid = tab.get_id() uri = uri.strip() name = "%d-%d" % (os.getpid(), self.next_pid()) |