From 4361220a48fd537d62bb99f281cfa0892bb37e63 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 9 May 2014 12:10:03 +0200 Subject: [PATCH] Add bindings for xo/xO (backtabopen(cur)) --- TODO | 6 ------ qutebrowser/config/configdata.py | 2 ++ qutebrowser/widgets/_tabbedbrowser.py | 6 ++++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 6513a375c..54f188b1d 100644 --- a/TODO +++ b/TODO @@ -361,12 +361,6 @@ Show and execute userscripts (command execute_userscript). Other ----- -xo -Open url in a new tab in background, the argument $URI will be repaced with the current uri (command: backopen, aliases: bopen ). - -xO -Open url in a new tab in background, set current url in the navigation bar (command: backopen_url). - wo Open url in a new instance (command: winopen, aliases: wopen, w). diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index eb58b3017..3f36c4f03 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -545,6 +545,8 @@ DATA = OrderedDict([ ('go', 'opencur'), ('O', 'tabopen'), ('gO', 'tabopencur'), + ('xo', 'backtabopen'), + ('xO', 'backtabopencur'), ('ga', 'tabopen about:blank'), ('d', 'tabclose'), ('co', 'only'), diff --git a/qutebrowser/widgets/_tabbedbrowser.py b/qutebrowser/widgets/_tabbedbrowser.py index 33d020225..ffc98aa04 100644 --- a/qutebrowser/widgets/_tabbedbrowser.py +++ b/qutebrowser/widgets/_tabbedbrowser.py @@ -282,6 +282,12 @@ class TabbedBrowser(TabWidget): url = urlutils.urlstring(self.currentWidget().url()) message.set_cmd_text(':open ' + url) + @cmdutils.register(instance='mainwindow.tabs', hide=True) + def backtabopencur(self): + """Set the statusbar to :backtabopen and the current URL.""" + url = urlutils.urlstring(self.currentWidget().url()) + message.set_cmd_text(':backtabopen ' + url) + @cmdutils.register(instance='mainwindow.tabs', name='undo') def undo_close(self): """Switch to the previous tab, or skip [count] tabs.