]> git.rmz.io Git - dotfiles.git/blobdiff - qutebrowser/config.py
qutebrowser: add bindings for qute-pass
[dotfiles.git] / qutebrowser / config.py
index 32fb103918cc6c68a79d489eb2c1d04a3ab57978..a3bf1223191fb9cab7dbf64033040216208627fc 100644 (file)
@@ -281,7 +281,7 @@ c.colors.prompts.bg = '#333333'
 
 ## Background color of the statusbar in private browsing + command mode.
 ## Type: QssColor
 
 ## Background color of the statusbar in private browsing + command mode.
 ## Type: QssColor
-# c.colors.statusbar.command.private.bg = 'grey'
+# c.colors.statusbar.command.private.bg = 'darkslategray'
 
 ## Foreground color of the statusbar in private browsing + command mode.
 ## Type: QssColor
 
 ## Foreground color of the statusbar in private browsing + command mode.
 ## Type: QssColor
@@ -563,14 +563,29 @@ c.confirm_quit = ['downloads']
 ## Type: Bool
 # c.content.canvas_reading = True
 
 ## Type: Bool
 # c.content.canvas_reading = True
 
-## Which cookies to accept.
+## Which cookies to accept. Note that with QtWebKit, only `all` and
+## `never` are supported as per-domain values. Setting `no-3rdparty` or
+## `no-unknown-3rdparty` per-domain on QtWebKit will have the same effect
+## as `all`.
 ## Type: String
 ## Valid values:
 ##   - all: Accept all cookies.
 ##   - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
 ##   - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
 ##   - never: Don't accept cookies at all.
 ## Type: String
 ## Valid values:
 ##   - all: Accept all cookies.
 ##   - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
 ##   - no-unknown-3rdparty: Accept cookies from the same origin only, unless a cookie is already set for the domain. On QtWebEngine, this is the same as no-3rdparty.
 ##   - never: Don't accept cookies at all.
-c.content.cookies.accept = 'no-3rdparty'
+c.content.cookies.accept = 'never'
+
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.amazon.co.uk/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.amazon.de/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.duckduckgo.com/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.freedesktop.org/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.github.com/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.gitlab.com/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.google.com/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.humblebundle.com/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.mailfence.com/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.reddit.com/*')
+config.set('content.cookies.accept', 'no-3rdparty', '*://*.steampowered.com/*')
 
 ## Store cookies. Note this option needs a restart with QtWebEngine on Qt
 ## < 5.9.
 
 ## Store cookies. Note this option needs a restart with QtWebEngine on Qt
 ## < 5.9.
@@ -600,6 +615,16 @@ c.content.dns_prefetch = True
 ## Type: Bool
 # c.content.frame_flattening = False
 
 ## Type: Bool
 # c.content.frame_flattening = False
 
+## Set fullscreen notification overlay timeout in milliseconds. If set to
+## 0, no overlay will be displayed.
+## Type: Int
+# c.content.fullscreen.overlay_timeout = 3000
+
+## Limit fullscreen to the browser window (does not expand to fill the
+## screen).
+## Type: Bool
+# c.content.fullscreen.window = False
+
 ## Allow websites to request geolocations.
 ## Type: BoolAsk
 ## Valid values:
 ## Allow websites to request geolocations.
 ## Type: BoolAsk
 ## Valid values:
@@ -764,7 +789,9 @@ c.content.headers.accept_language = 'en-UK;q=1.0, en;q=0.9, de;q=0.7, fr;q=0.7,
 ##   - true
 ##   - false
 ##   - ask
 ##   - true
 ##   - false
 ##   - ask
-# c.content.notifications = 'ask'
+c.content.notifications = 'ask'
+config.set('content.notifications', True, '*://*.gitlab.com/*')
+config.set('content.notifications', True, '*://*.google.com/*')
 
 ## Allow pdf.js to view PDF files in the browser. Note that the files can
 ## still be downloaded by clicking the download button in the pdf.js
 
 ## Allow pdf.js to view PDF files in the browser. Note that the files can
 ## still be downloaded by clicking the download button in the pdf.js
@@ -832,6 +859,14 @@ with config.pattern('*://calendar.google.com/*') as p:
 ##   - ask
 # c.content.ssl_strict = 'ask'
 
 ##   - ask
 # c.content.ssl_strict = 'ask'
 
+## How navigation requests to URLs with unknown schemes are handled.
+## Type: String
+## Valid values:
+##   - disallow: Disallows all navigation requests to URLs with unknown schemes.
+##   - allow-from-user-interaction: Allows navigation requests to URLs with unknown schemes that are issued from user-interaction (like a mouse-click), whereas other navigation requests (for example from JavaScript) are suppressed.
+##   - allow-all: Allows all navigation requests to URLs with unknown schemes.
+# c.content.unknown_url_scheme_policy = 'allow-from-user-interaction'
+
 ## List of user stylesheet filenames to use.
 ## Type: List of File, or File
 # c.content.user_stylesheets = []
 ## List of user stylesheet filenames to use.
 ## Type: List of File, or File
 # c.content.user_stylesheets = []
@@ -850,11 +885,6 @@ with config.pattern('*://calendar.google.com/*') as p:
 ##   - disable-non-proxied-udp: WebRTC should only use TCP to contact peers or servers unless the proxy server supports UDP. This doesn't expose any local addresses either.
 # c.content.webrtc_ip_handling_policy = 'all-interfaces'
 
 ##   - disable-non-proxied-udp: WebRTC should only use TCP to contact peers or servers unless the proxy server supports UDP. This doesn't expose any local addresses either.
 # c.content.webrtc_ip_handling_policy = 'all-interfaces'
 
-## Limit fullscreen to the browser window (does not expand to fill the
-## screen).
-## Type: Bool
-# c.content.windowed_fullscreen = False
-
 ## Monitor load requests for cross-site scripting attempts. Suspicious
 ## scripts will be blocked and reported in the inspector's JavaScript
 ## console. Note that bypasses for the XSS auditor are widely known and
 ## Monitor load requests for cross-site scripting attempts. Suspicious
 ## scripts will be blocked and reported in the inspector's JavaScript
 ## console. Note that bypasses for the XSS auditor are widely known and
@@ -1080,10 +1110,18 @@ c.hints.min_chars = 2
 ## Type: List of Regex
 # c.hints.next_regexes = ['\\bnext\\b', '\\bmore\\b', '\\bnewer\\b', '\\b[>→≫]\\b', '\\b(>>|»)\\b', '\\bcontinue\\b']
 
 ## Type: List of Regex
 # c.hints.next_regexes = ['\\bnext\\b', '\\bmore\\b', '\\bnewer\\b', '\\b[>→≫]\\b', '\\b(>>|»)\\b', '\\bcontinue\\b']
 
+## Padding (in pixels) for hints.
+## Type: Padding
+# c.hints.padding = {'top': 0, 'bottom': 0, 'left': 3, 'right': 3}
+
 ## Comma-separated list of regular expressions to use for 'prev' links.
 ## Type: List of Regex
 # c.hints.prev_regexes = ['\\bprev(ious)?\\b', '\\bback\\b', '\\bolder\\b', '\\b[<←≪]\\b', '\\b(<<|«)\\b']
 
 ## Comma-separated list of regular expressions to use for 'prev' links.
 ## Type: List of Regex
 # c.hints.prev_regexes = ['\\bprev(ious)?\\b', '\\bback\\b', '\\bolder\\b', '\\b[<←≪]\\b', '\\b(<<|«)\\b']
 
+## Rounding radius (in pixels) for the edges of hints.
+## Type: Int
+# c.hints.radius = 3
+
 ## Scatter hint key chains (like Vimium) or not (like dwb). Ignored for
 ## number hints.
 ## Type: Bool
 ## Scatter hint key chains (like Vimium) or not (like dwb). Ignored for
 ## number hints.
 ## Type: Bool
@@ -1207,7 +1245,7 @@ c.hints.scatter = False
 ##   - last-visible: Open new tabs in the most recently visible window.
 # c.new_instance_open_target_window = 'last-focused'
 
 ##   - last-visible: Open new tabs in the most recently visible window.
 # c.new_instance_open_target_window = 'last-focused'
 
-## Show a filebrowser in upload/download prompts.
+## Show a filebrowser in download prompts.
 ## Type: Bool
 # c.prompt.filebrowser = True
 
 ## Type: Bool
 # c.prompt.filebrowser = True
 
@@ -1301,6 +1339,11 @@ c.scrolling.bar = 'when-searching'
 ## Type: Bool
 # c.search.incremental = True
 
 ## Type: Bool
 # c.search.incremental = True
 
+## Wrap around at the top and bottom of the page when advancing through
+## text matches using `:search-next` and `:search-prev`.
+## Type: Bool
+# c.search.wrap = True
+
 ## Name of the session to save by default. If this is set to null, the
 ## session which was last loaded is saved.
 ## Type: SessionName
 ## Name of the session to save by default. If this is set to null, the
 ## session which was last loaded is saved.
 ## Type: SessionName
@@ -1622,14 +1665,24 @@ c.url.default_page = 'https://duckduckgo.com/?t=chakra'
 ## Type: Bool
 # c.url.open_base_url = False
 
 ## Type: Bool
 # c.url.open_base_url = False
 
-## Search engines which can be used via the address bar. Maps a search
+## Search engines which can be used via the address bar.  Maps a search
 ## engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
 ## placeholder. The placeholder will be replaced by the search term, use
 ## engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
 ## placeholder. The placeholder will be replaced by the search term, use
-## `{{` and `}}` for literal `{`/`}` signs. The search engine named
-## `DEFAULT` is used when `url.auto_search` is turned on and something
-## else than a URL was entered to be opened. Other search engines can be
-## used by prepending the search engine name to the search term, e.g.
-## `:open google qutebrowser`.
+## `{{` and `}}` for literal `{`/`}` braces.  The following further
+## placeholds are defined to configure how special characters in the
+## search terms are replaced by safe characters (called 'quoting'):
+##  * `{}` and `{semiquoted}` quote everything except slashes; this is the
+##    most sensible choice for almost all search engines (for the search
+##    term `slash/and&amp` this placeholder expands to `slash/and%26amp`).
+##  * `{quoted}` quotes all characters (for `slash/and&amp` this
+##    placeholder   expands to `slash%2Fand%26amp`).
+##  * `{unquoted}` quotes nothing (for `slash/and&amp` this placeholder
+##    expands to `slash/and&amp`).
+## The search engine named `DEFAULT` is used when
+## `url.auto_search` is turned on and something else than a URL was
+## entered to be opened. Other search engines can be used by prepending
+## the search engine name to the search term, e.g.  `:open google
+## qutebrowser`.
 ## Type: Dict
 c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?t=chakra&q={}',
                        'ddg':     'https://duckduckgo.com/?t=chakra&q={}',
 ## Type: Dict
 c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?t=chakra&q={}',
                        'ddg':     'https://duckduckgo.com/?t=chakra&q={}',
@@ -1803,6 +1856,10 @@ config.bind('m', 'spawn mpv {url}')
 # config.bind('sk', 'set-cmd-text -s :bind')
 # config.bind('sl', 'set-cmd-text -s :set -t')
 # config.bind('ss', 'set-cmd-text -s :set')
 # config.bind('sk', 'set-cmd-text -s :bind')
 # config.bind('sl', 'set-cmd-text -s :set -t')
 # config.bind('ss', 'set-cmd-text -s :set')
+config.bind('tCH', 'spawn --userscript config-cycle-tld -p    content.cookies.accept no-3rdparty never;; reload')
+config.bind('tCh', 'spawn --userscript config-cycle-tld -p    content.cookies.accept no-3rdparty never;; reload')
+config.bind('tcH', 'spawn --userscript config-cycle-tld -p -t content.cookies.accept no-3rdparty never;; reload')
+config.bind('tch', 'spawn --userscript config-cycle-tld -p -t content.cookies.accept no-3rdparty never;; reload')
 # config.bind('tIH', 'config-cycle -p -u *://*.{url:host}/* content.images ;; reload')
 # config.bind('tIh', 'config-cycle -p -u *://{url:host}/* content.images ;; reload')
 # config.bind('tIu', 'config-cycle -p -u {url} content.images ;; reload')
 # config.bind('tIH', 'config-cycle -p -u *://*.{url:host}/* content.images ;; reload')
 # config.bind('tIh', 'config-cycle -p -u *://{url:host}/* content.images ;; reload')
 # config.bind('tIu', 'config-cycle -p -u {url} content.images ;; reload')
@@ -1847,6 +1904,9 @@ config.bind('m', 'spawn mpv {url}')
 # config.bind('yp', 'yank pretty-url')
 # config.bind('yt', 'yank title')
 # config.bind('yy', 'yank')
 # config.bind('yp', 'yank pretty-url')
 # config.bind('yt', 'yank title')
 # config.bind('yy', 'yank')
+config.bind('zl',  'spawn --userscript qute-pass')
+config.bind('zul', 'spawn --userscript qute-pass --username-only')
+config.bind('zpl', 'spawn --userscript qute-pass --password-only')
 # config.bind('{{', 'navigate prev -t')
 # config.bind('}}', 'navigate next -t')
 
 # config.bind('{{', 'navigate prev -t')
 # config.bind('}}', 'navigate next -t')