diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2023-01-14 14:47:33 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2023-01-14 14:47:33 +0100 |
commit | 23e2bfd987c430bb41bc7860c46c2f572e9e2db4 (patch) | |
tree | a9a477e11fb6dbea189835147a149e56c0f03a7f /.config/qutebrowser/config.py | |
parent | ce6be946d024aa55a15d576388d05f90be671cf2 (diff) | |
download | dots-23e2bfd987c430bb41bc7860c46c2f572e9e2db4.tar.gz |
Sat Jan 14 02:47:33 PM CET 2023
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') |