Using Qutebrowser

No, definitely using webengine:

c.backend = "webengine"
1 Like

Replace home with system and goat with qutebrowser.

Moishe has a problem, so like any good chassid, he goes to visit his Rebbe.

Moishe: Rebbe, my apartment is very crowded. Besides me and my wife, there are also my children and my mother-in-law. I don’t have enough room! What should I do?

Rebbe: Bring a goat into the house and let him live with you.

Moishe: But Rebbe, there’s no room for a goat.

Rebbe: Bring a goat in the house, I tell you!

In a month’s time, Moishe returns to the Rebbe.

Moishe: Rebbe, things are much worse now. With the goat in the apartment there is no place to move.

Rebbe: So get rid of the goat!

The next day, Moishe returns to Rebbe smiling.

Moishe: Thank you, thank you Rebbe. All of the sudden, our apartment is huge.

4 Likes

LOL. Good one. Is this a fancy way of saying you have uninstalled Qutebrowser?

No. Just spent a day with it, and then launched Chrome.

3 Likes

@PackRat

Yes this is “my config.py”.

Small part is from me, but the most is from Dobbie. :wink:

But I’m not done with it yet.
I still want to rewrite the config.
Make it more my own.

But the config from Dobbie is a good start. A very good start.

Don`t forget:

It is a work in progress!

### PADDING ###
v_padding = 10
h_padding = 8
s_padding = 10

### COLOURS ###
bg = '#1C2023'
obg = '#1C2023'
fg = '#A09999'
sbg = '#2d2d2d'
sfg = '#878E7C'
mfg = '#637A8A'
ssfg = '#005577'
sbbg = '#1a1b1d'
efg = '#637A8A'
btfg = '#353535'
ft = '#A09999'
fc = '#90a57d'
hb = '#877979'
hf = '#2d2d2d'
sfg = '#8B8F7C'
pbg = '#151515'
pfg = '#151515'
oddtab = '#656060'
sj = '#151515'
sjb = '#005577'
sjnb = '#1C2023'

config.load_autoconfig()

c.content.autoplay = False

#   - 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'

# Try to pre-fetch DNS entries to speed up browsing.
# Type: Bool
c.content.dns_prefetch = True

# Enable quirks (such as faked user agent headers) needed to get
# specific sites to work properly.
# Type: Bool
c.content.site_specific_quirks.enabled = True

# Allow screen-sharing
c.content.desktop_capture = False

# Disable a list of named quirks. The js-string-replaceall quirk is
# needed for Nextcloud Calendar < 2.2.0 with QtWebEngine < 5.15.3.
# However, the workaround is not fully compliant to the ECMAScript spec
# and might cause issues on other websites, so it's disabled by default.
# Type: FlagList
# Valid values:
#   - ua-whatsapp
#   - ua-google
#   - ua-slack
#   - ua-googledocs
#   - js-whatsapp-web
#   - js-discord
#   - js-string-replaceall
#   - js-globalthis
#   - js-object-fromentries
#   - misc-krunker
#   - misc-mathml-darkmode
c.content.site_specific_quirks.skip = ['js-string-replaceall']

c.content.geolocation = False

c.content.mouse_lock = False

config.set('content.headers.accept_language', '', 'https://matchmaker.krunker.io/*')

# Custom headers for qutebrowser HTTP requests.
# Type: Dict
c.content.headers.custom = {}

c.content.headers.do_not_track = True


# Valid values:
#   - always: Always send the Referer.
#   - never: Never send the Referer. This is not recommended, as some sites may break.
#   - same-domain: Only send the Referer for the same domain. This will still protect your privacy, but shouldn't break any sites. With QtWebEngine, the referer will still be sent for other domains, but with stripped path information.
c.content.headers.referer = 'same-domain'

config.set(
    "content.headers.user_agent",
    "Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version}",
    "https://web.whatsapp.com/",
)

config.set(
    "content.headers.user_agent",
    "Mozilla/5.0 ({os_info}) AppleWebKit/{webkit_version} (KHTML, like Gecko) {upstream_browser_key}/{upstream_browser_version} Safari/{webkit_version} Edg/{upstream_browser_version}",
    "https://accounts.google.com/*",
)
config.set(
    "content.headers.user_agent",
    "Mozilla/5.0 ({os_info}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99 Safari/537.36",
    "https://*.slack.com/*",
)

### AD BLOCKING ###
c.content.blocking.hosts.lists = [("https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts")]
c.content.blocking.whitelist = []
c.content.blocking.enabled = True
c.content.blocking.method = 'both'
c.content.blocking.adblock.lists = [
        "https://easylist.to/easylist/easylist.txt",
        "https://easylist.to/easylist/easyprivacy.txt",
        "https://secure.fanboy.co.nz/fanboy-annoyance.txt",
        "https://easylist-downloads.adblockplus.org/antiadblockfilters.txt",
        "https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt",
        "https://www.i-dont-care-about-cookies.eu/abp/",
        "https://secure.fanboy.co.nz/fanboy-cookiemonster.txt",
        "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt",
        "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt",
        "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/legacy.txt",
        "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt",
        "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt",
        "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt",
        "https://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/legacy.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2020.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/filters-2021.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/badware.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/privacy.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/badlists.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/annoyances.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/resource-abuse.txt",
        "https://github.com/uBlockOrigin/uAssets/raw/master/filters/unbreak.txt"
        "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext&_=223428",
        "https://raw.githubusercontent.com/brave/adblock-lists/master/brave-lists/brave-social.txt",
        "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt",
        "https://raw.githubusercontent.com/brave/adblock-lists/master/brave-unbreak.txt"
]
c.content.blocking.method = "both"
c.content.blocking.adblock.lists.clear()
c.content.blocking.adblock.lists.append("https://easylist-downloads.adblockplus.org/advblock.txt")
c.content.blocking.adblock.lists.append("https://easylist-downloads.adblockplus.org/cntblock.txt")
c.content.blocking.adblock.lists.append("https://easylist.to/easylist/easyprivacy.txt")
c.content.blocking.hosts.lists.clear()
c.content.blocking.hosts.lists.append("https://ewpratten.retrylife.ca/youtube_ad_blocklist/hosts.ipv4.txt")

# Enable hyperlink auditing (`<a ping>`).
# Type: Bool
c.content.hyperlink_auditing = False

# Load images automatically in web pages.
# Type: Bool
c.content.images = True

# Load images automatically in web pages.
# Type: Bool
config.set('content.images', True, 'chrome-devtools://*')

# Load images automatically in web pages.
# Type: Bool
config.set('content.images', True, 'devtools://*')

# Allow JavaScript to read from or write to the clipboard. With
# QtWebEngine, writing the clipboard as response to a user interaction
# is always allowed.
# Type: Bool
c.content.javascript.can_access_clipboard = False

# Allow JavaScript to close tabs.
# Type: Bool
c.content.javascript.can_close_tabs = False

# Enable JavaScript.
# Type: Bool
c.content.javascript.enabled = True
    
# Allow websites to show notifications.
# Type: BoolAsk
# Valid values:
#   - true
#   - false
#   - ask
c.content.notifications.enabled = False

# What notification presenter to use for web notifications. Note that
# not all implementations support all features of notifications: - With
# PyQt 5.14, any setting other than `qt` does not support  the `click`
# and   `close` events, as well as the `tag` option to replace existing
# notifications. - The `qt` and `systray` options only support showing
# one notification at the time   and ignore the `tag` option to replace
# existing notifications. - The `herbe` option only supports showing one
# notification at the time and doesn't   show icons. - The `messages`
# option doesn't show icons and doesn't support the `click` and
# `close` events.
# Type: String
# Valid values:
#   - auto: Tries `libnotify`, `systray` and `messages`, uses the first one available without showing error messages.
#   - qt: Use Qt's native notification presenter, based on a system tray icon. Switching from or to this value requires a restart of qutebrowser. Recommended over `systray` on PyQt 5.14.
#   - libnotify: Shows messages via DBus in a libnotify-compatible way. If DBus isn't available, falls back to `systray` or `messages`, but shows an error message.
#   - systray: Use a notification presenter based on a systray icon. Falls back to `libnotify` or `messages` if not systray is available. This is a reimplementation of the `qt` setting value, but with the possibility to switch to it at runtime.
#   - messages: Show notifications as qutebrowser messages. Most notification features aren't available.
#   - herbe: (experimental!) Show notifications using herbe (github.com/dudik/herbe). Most notification features aren't available.
c.content.notifications.presenter = 'messages'

# Whether to show the origin URL for notifications. Note that URL
# patterns with this setting only get matched against the origin part of
# the URL, so e.g. paths in patterns will never match. Note that with
# the `qt` presenter, origins are never shown.
# Type: Bool
c.content.notifications.show_origin = True

# Enable plugins in Web pages.
# Type: Bool
c.content.plugins = False

# Open new windows in private browsing mode which does not record
# visited pages.
# Type: Bool
c.content.private_browsing = True

# Proxy to use. In addition to the listed values, you can use a
# `socks://...` or `http://...` URL. Note that with QtWebEngine, it will
# take a couple of seconds until the change is applied, if this value is
# changed at runtime. Authentication for SOCKS proxies isn't supported
# due to Chromium limitations.
# Type: Proxy
# Valid values:
#   - system: Use the system wide proxy.
#   - none: Don't use any proxy
c.content.proxy = 'system'

# Send DNS requests over the configured proxy.
# Type: Bool
c.content.proxy_dns_requests = False

# Allow websites to register protocol handlers via
# `navigator.registerProtocolHandler`.
# Type: BoolAsk
# Valid values:
#   - true
#   - false
#   - ask
c.content.register_protocol_handler = 'ask'

# How to proceed on TLS certificate errors.
# Type: String
# Valid values:
#   - ask: Ask how to proceed for every certificate error (unless non-overridable due to HSTS).
#   - ask-block-thirdparty: Ask how to proceed for normal page loads, but silently block resource loads.
#   - block: Automatically block loading on certificate errors.
#   - load-insecurely: Force loading pages despite certificate errors. This is *insecure* and should be avoided. Instead of using this, consider fixing the underlying issue or importing a self-signed certificate via `certutil` (or Chromium) instead.
c.content.tls.certificate_errors = 'block'

# Enable WebGL.
# Type: Bool
c.content.webgl = False

# Which interfaces to expose via WebRTC.
# Type: String
# Valid values:
#   - all-interfaces: WebRTC has the right to enumerate all interfaces and bind them to discover public interfaces.
#   - default-public-and-private-interfaces: WebRTC should only use the default route used by http. This also exposes the associated default private address. Default route is the route chosen by the OS on a multi-homed endpoint.
#   - default-public-interface-only: WebRTC should only use the default route used by http. This doesn't expose any local addresses.
#   - 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 = 'disable-non-proxied-udp'

# Monitor load requests for cross-site scripting attempts. Suspicious
# scripts will be blocked and reported in the devtools JavaScript
# console. Note that bypasses for the XSS auditor are widely known and
# it can be abused for cross-site info leaks in some scenarios, see:
# https://www.chromium.org/developers/design-documents/xss-auditor
# Type: Bool
c.content.xss_auditing = False

# Directory to save downloads to. If unset, a sensible OS-specific
# default is used.
# Type: Directory
c.downloads.location.directory = '/home/subjunkie/Downloads/'

# Which categories to show (in which order) in the :open completion.
# Type: FlagList
# Valid values:
#   - searchengines
#   - quickmarks
#   - bookmarks
#   - history
#   - filesystem
c.completion.open_categories = ['searchengines', 'quickmarks', 'history']

# Search engines
c.url.searchengines = {
    "DEFAULT": "https://searx.envs.net/search?q={}",   
}

# Automatically abort insecure (HTTP) downloads originating from secure
# (HTTPS) pages. For per-domain settings, the relevant URL is the URL
# initiating the download, not the URL the download itself is coming
# from. It's not recommended to set this setting to false globally.
# Type: Bool
c.downloads.prevent_mixed_content = True

# Duration (in milliseconds) to wait before removing finished downloads.
# If set to -1, downloads are never removed.
# Type: Int
c.downloads.remove_finished = -1

# List of widgets displayed in the statusbar.
# Type: List of StatusbarWidget
# Valid values:
#   - url: Current page URL.
#   - scroll: Percentage of the current page position like `10%`.
#   - scroll_raw: Raw percentage of the current page position like `10`.
#   - history: Display an arrow when possible to go back/forward in history.
#   - tabs: Current active tab, e.g. `2`.
#   - keypress: Display pressed keys when composing a vi command.
#   - progress: Progress bar for the current page loading.
#   - text:foo: Display the static text after the colon, `foo` in the example.
c.statusbar.widgets = ['progress', 'scroll']

# Page(s) to open at the start.
# Type: List of FuzzyUrl, or FuzzyUrl
c.url.start_pages = 'https://searx.envs.net/search?'

### STATUSBAR SETTINGS ###
c.statusbar.show = 'always'
#c.statusbar.show = 'in-mode'
c.statusbar.position = 'bottom'
#c.tabs.padding = { 'top': v_padding, 'bottom': v_padding, 'left': h_padding, 'right': h_padding }
c.statusbar.widgets = ['history', 'tabs', 'keypress', 'url', 'scroll', 'progress', 'text:Qutebrowser']

c.colors.statusbar.caret.bg = fc
c.colors.statusbar.caret.fg = fg
c.colors.statusbar.caret.selection.bg = pbg
c.colors.statusbar.caret.selection.fg = fg

c.colors.statusbar.command.bg = sbg
c.colors.statusbar.command.fg = fg

c.colors.statusbar.command.private.bg = pbg
c.colors.statusbar.command.private.fg = ft

c.colors.statusbar.insert.bg = sbg
c.colors.statusbar.insert.fg = efg
c.colors.statusbar.normal.bg = sbg
c.colors.statusbar.normal.fg = sfg

c.colors.statusbar.passthrough.bg = sbg
c.colors.statusbar.passthrough.fg = fg

c.colors.statusbar.private.bg = pbg
c.colors.statusbar.private.fg = ft

c.colors.statusbar.progress.bg = mfg

c.colors.statusbar.url.error.fg = efg
c.colors.statusbar.url.fg = sfg
c.colors.statusbar.url.hover.fg = ft
c.colors.statusbar.url.success.http.fg = sfg
c.colors.statusbar.url.success.https.fg = mfg
c.colors.statusbar.url.warn.fg = 'red'

##Prompt##
c.colors.prompts.bg = bg
c.colors.prompts.border = '2px solid {bg}'
c.colors.prompts.fg = fg
c.colors.prompts.selected.bg = sbg

##Contextmenu##
c.colors.contextmenu.menu.bg = hf
c.colors.contextmenu.menu.fg = fg
c.colors.contextmenu.selected.bg = hf
c.colors.contextmenu.selected.fg = sfg
c.colors.contextmenu.disabled.fg = '#76777a'

### Completion###
c.colors.completion.category.bg = sj
c.colors.completion.category.border.bottom = sjnb
c.colors.completion.category.border.top = sjnb
c.colors.completion.category.fg = sjb
c.colors.completion.even.bg = sjnb
c.colors.completion.fg = fg
c.colors.completion.scrollbar.fg = sjnb
c.colors.completion.item.selected.bg = sjnb
c.colors.completion.item.selected.border.bottom = sjnb
c.colors.completion.item.selected.border.top = sjnb
c.colors.completion.item.selected.fg = sjb
c.colors.completion.item.selected.match.fg = mfg
c.colors.completion.match.fg = fc
c.colors.completion.odd.bg = sjnb

### TAB SETTINGS ###
c.tabs.title.format = '{audio} {private} {index}: {current_title}'
#c.tabs.padding = { 'top': v_padding, 'bottom': v_padding, 'left': h_padding, 'right': h_padding }
c.tabs.indicator.padding = {"top": 0, "bottom": 0, "left": 10, "right": 10}
c.tabs.new_position.related = 'next'
c.tabs.new_position.unrelated = 'next'
c.tabs.select_on_remove = 'prev'
c.tabs.show = 'multiple'
#c.tabs.show = 'never'
c.tabs.tabs_are_windows = False
#c.tabs.show = 'switching'
c.tabs.title.alignment = 'left'
c.tabs.last_close = 'ignore'

c.colors.tabs.bar.bg = bg
c.colors.tabs.even.bg = bg
c.colors.tabs.even.fg = oddtab
c.colors.tabs.odd.bg = bg
c.colors.tabs.odd.fg = oddtab
c.colors.tabs.pinned.even.bg = bg
c.colors.tabs.pinned.even.fg = fg
c.colors.tabs.pinned.odd.bg = bg
c.colors.tabs.pinned.odd.fg = fg
c.colors.tabs.pinned.selected.even.bg = sbg
c.colors.tabs.pinned.selected.even.fg = sfg
c.colors.tabs.pinned.selected.odd.bg = sbg
c.colors.tabs.pinned.selected.odd.fg = sfg
c.colors.tabs.selected.even.bg = sbg
c.colors.tabs.selected.even.fg = ft
c.colors.tabs.selected.odd.bg = sbg
c.colors.tabs.selected.odd.fg = ft

c.colors.tabs.indicator.start = mfg
c.colors.tabs.indicator.stop = efg
c.colors.tabs.indicator.error = pfg

### DOWNLOADS BAR ###
c.downloads.position = 'bottom'
c.downloads.remove_finished = 1000
c.downloads.location.prompt = False
c.downloads.location.directory = "~/Downloads"
c.downloads.open_dispatcher = 'rifle'


## Some stuff
c.colors.webpage.preferred_color_scheme = 'dark'
c.window.title_format = "{private}{perc}{current_title}{title_sep}qutebrowser"
c.content.user_stylesheets = '/home/subjunkie/.config/qutebrowser/stylesheets.css'
#config.set('ccolors.webpage.preferred_color_scheme', False)
config.set('colors.webpage.bg', '#151515')
config.set('colors.webpage.darkmode.enabled', False)

### SCROLLBAR ###
c.scrolling.bar = 'when-searching'
c.scrolling.smooth = False

##Fonts
font_size = 10
c.hints.border = f'2px solid'
c.fonts.hints = f'{font_size + 2}pt Liberation Sans-serif'
c.fonts.statusbar = f'{font_size}pt UW Ttyp 0'
c.fonts.downloads = f'{font_size}pt Liberation Sans'
c.fonts.contextmenu = f'{font_size}pt Liberation Sans'
c.fonts.tabs.selected= f'{font_size + 0.5}pt Liberation Sans Bold'
c.fonts.tabs.unselected = f'{font_size}pt Liberation Sans'
c.fonts.completion.entry = f'{font_size + 1}pt Liberation Sans'
c.fonts.completion.category = f'{font_size + 2}pt Liberation Sans'

## Font family for fixed fonts.
## Type: FontFamily
c.fonts.web.family.fixed = 'Liberation Sans Mono'

## Font family for serif fonts.
## Type: FontFamily
c.fonts.web.family.serif = 'Liberation Serif'

## Font family for standard fonts.
## Type: FontFamily
c.fonts.web.family.standard = 'Liberation Serif'

#Hints#
c.hints.border = "1px solid #CCCCCC"
c.hints.mode = "number"
c.hints.chars = "abcdefghijklmnopqrstuvwxyz!@#$%^*()+{}:|?-=[];\\/1234567890"
c.hints.min_chars = 1
c.keyhint.blacklist = ["*"]

3 Likes