From 52afa1a4798c7c8918f272179d9a9984f5cb12ba Mon Sep 17 00:00:00 2001 From: ZDarian Date: Sun, 18 Jan 2015 07:39:26 -0700 Subject: [PATCH] Added permanent (count-independent) tab hide according to perm-hide variable. --- qutebrowser/config/configdata.py | 4 ++++ qutebrowser/mainwindow/tabwidget.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 9d22c1f72..e15e6c8d2 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -360,6 +360,10 @@ DATA = collections.OrderedDict([ SettingValue(typ.Bool(), 'false'), "Hide the tabbar if only one tab is open."), + ('perm-hide', + SettingValue(typ.Bool(), 'false'), + "Hide permanently."), + ('wrap', SettingValue(typ.Bool(), 'true'), "Whether to wrap when changing tabs."), diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 6b1773fc6..94fe57c21 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -106,7 +106,8 @@ class TabBar(QTabBar): def autohide(self): """Auto-hide the tabbar if needed.""" auto_hide = config.get('tabs', 'auto-hide') - if auto_hide and self.count() == 1: + perm_hide = config.get('tabs', 'perm-hide') + if perm_hide or auto_hide and self.count() == 1: self.hide() else: self.show()