diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-08-25 04:25:40 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-08-25 04:25:40 +0100 |
commit | 9ecd7ede0f3b1043aa8a6b1e1558176c09814a5f (patch) | |
tree | 95373543b667ace25618118508e486b1a6fe4467 /VimperatorrcBuilder.py | |
parent | 0665e351aac54294107aa9a02de5910d91a8bae8 (diff) |
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'VimperatorrcBuilder.py')
-rw-r--r-- | VimperatorrcBuilder.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/VimperatorrcBuilder.py b/VimperatorrcBuilder.py index 5313b15..f21ffef 100644 --- a/VimperatorrcBuilder.py +++ b/VimperatorrcBuilder.py @@ -22,6 +22,13 @@ class VimperatorrcBuilder(): bang_shortcuts_pfx = 's', 'S' bang_shortcuts = {} default_engine = 'duckduckgo' + toolbars = { + 'bookmarks': False, + 'addons': False, + 'menu': False, + 'navigation': True, + 'tabs': True, + } cli_bindings = { '<C-j>': '<Return>', @@ -48,6 +55,15 @@ class VimperatorrcBuilder(): self.bang_shortcuts[seq] = bang_shortcut + def disable_toolbars(self): + """ Disable the toolbars in the gui of the browser """ + + self.toolbars['addons'] = False + self.toolbars['bookmarks'] = False + self.toolbars['menu'] = False + self.toolbars['navigation'] = False + self.toolbars['tabs'] = False + def set_default_search_engine(self, engine): """ Set the default search engine (i.e. when you type 'open foo') """ @@ -75,6 +91,9 @@ class VimperatorrcBuilder(): output += '\n" default search engine\n' output += 'set defsearch=' + self.default_engine + '\n' + output += '\n" toolbars displayed in the browser\n' + output += 'set toolbars=' + ','.join(('no' if not value else '') + key for key,value in self.toolbars.items()) + '\n' + output += '\n" bang shortcuts\n' for key in self.bang_shortcuts: output += "noremap '" + self.bang_shortcuts_pfx[0] + key + "' o!" + self.bang_shortcuts[key] + ' \n' |