diff options
Diffstat (limited to '.config/qutebrowser/config.py')
-rwxr-xr-x | .config/qutebrowser/config.py | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index d9aaa8f..e24591b 100755 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -50,27 +50,30 @@ def get_qt_arguments() -> list: ) -@cmdutils.register() -def bookmark_save(url: QUrl): - """Save the current page as a bookmark.""" - manager = objreg.get('bookmark-manager') - tags = message.ask( - title="Add bookmark:", - mode=PromptMode.text, - url=url.toString(QUrl.RemovePassword | QUrl.FullyEncoded), - text=( - "Please enter bookmark tags for<br/><b>" - f"{html.escape(url.toDisplayString())}</b>" - ), - ) - - if not tags: - return - - try: - manager.add(url, tags) - except UrlAlreadyExistsError: - message.warning("Bookmark already exists.") +try: + @cmdutils.register() + def bookmark_save(url: QUrl): + """Save the current page as a bookmark.""" + manager = objreg.get('bookmark-manager') + tags = message.ask( + title="Add bookmark:", + mode=PromptMode.text, + url=url.toString(QUrl.RemovePassword | QUrl.FullyEncoded), + text=( + "Please enter bookmark tags for<br/><b>" + f"{html.escape(url.toDisplayString())}</b>" + ), + ) + + if not tags: + return + + try: + manager.add(url, tags) + except UrlAlreadyExistsError: + message.warning("Bookmark already exists.") +except ValueError: + pass config.load_autoconfig(False) @@ -97,9 +100,12 @@ config.set('content.notifications.enabled', True, '*://mail.google.com/*') config.set('content.register_protocol_handler', False) config.set('content.geolocation', False) -config.set('content.media.audio_video_capture', True, '*://*.zoho.eu/*') -config.set('content.media.audio_capture', True, '*://*.zoho.eu/*') -config.set('content.media.video_capture', True, '*://*.zoho.eu/*') +# config.set('content.media.audio_video_capture', True, '*://*.zoho.eu/*') +# config.set('content.media.audio_capture', True, '*://*.zoho.eu/*') +# config.set('content.media.video_capture', True, '*://*.zoho.eu/*') +config.set('content.media.audio_video_capture', True, 'https://meet.google.com/*') +config.set('content.media.audio_capture', True, 'https://meet.google.com/*') +config.set('content.media.video_capture', True, 'https://meet.google.com/*') config.set('completion.web_history.max_items', 0) config.set('tabs.background', True) @@ -144,8 +150,12 @@ config.set('content.headers.do_not_track', False, '*://*.thetrainline.com/*') config.set('content.blocking.enabled', False, '*://*.thetrainline.com/*') config.set('content.cookies.accept', 'all', '*://*.thetrainline.com/*') -config.bind(',m', 'spawn mpv {url}') +config.set( + 'editor.command', ["st", "nvim", "+normal {line}G{column0}l", "{file}"] +) + +config.bind(',m', 'spawn mpv --force-window=immediate {url}') config.bind('M', 'bookmark-save {url}') -if socket.gethostname() == 'work-01': +if socket.gethostname() == 'ws-work01': config.set('fonts.default_size', '14pt') |