dotfiles/qutebrowser/config/config.py
Marty Oehme e3742d43ec fonts: Fix for Iosevka on Voidlinux
Prefer regular 'Iosevka' font in most cases, not the highly specific
'Iosevka Nerd Font'. This may break some things back in Archlinux-land
but it is required for iosevka to be correctly displayed in Voidlinux,
and, to be honest, also feels more clean than using such a highly
specialized font for everything.

Additionally, we generally make use of both where possible, defaulting
to the more specific 'Nerd Font' family variant but falling back to
regular old Iosevka.

One exception is 'wezterm' which, though it nicely includes a font
fallback option (and a very configurable one at that), _always_ produces
a warning when the first font in a fallback list is not found -- even
when the specific 'warn_about_missing_glyphs' option is ticked. No clue
why but for now this works well enough for me.
2025-02-24 14:22:36 +01:00

101 lines
2.6 KiB
Python

import os
from typing import cast
# pylint: disable=C0111
from qutebrowser.config.config import ConfigContainer # noqa: F401
from qutebrowser.config.configfiles import ConfigAPI
from freedirect.freedirect import Redirects
config: ConfigAPI = cast(ConfigAPI, config) # noqa: F821 pylint: disable=E0602,C0103
c: ConfigContainer = cast(ConfigContainer, c) # noqa: F821 pylint: disable=E0602,C0103
# Autogenerated config.py
# Documentation:
# qute://help/configuring.html
# qute://help/settings.html
# load additional settings configured via autoconfig.yml
_ = config.load_autoconfig()
c.content.javascript.log_message.excludes = {
"userscript:_qute_stylesheet": [
"*Refused to apply inline style because it violates the following Content Security Policy directive: *"
],
"userscript:_qute_js": ["*TrustedHTML*"],
}
term = os.getenv("TERMINAL", "xterm")
c.completion.web_history.max_items = 1000
c.hints.uppercase = True
c.editor.command = [
term,
"start",
"--always-new-process",
"nvim",
"-f",
"{file}",
"-c",
"normal {line}G{column0}l",
]
# change filepicker
c.fileselect.handler = "external"
picker = [
term,
"start",
"--class",
"float",
"vifm",
"--choose-files",
"{}",
]
c.fileselect.single_file.command = picker
c.fileselect.multiple_files.command = picker
c.downloads.location.directory = os.getenv("XDG_DOWNLOAD_DIR", "~/downloads")
c.downloads.location.prompt = False
config.source("alias.py")
config.source("maps.py")
config.source("content.py")
config.source("searchengines.py")
_ = Redirects()
# Tab-Bar
# have tab bar on the right, not on the top
c.tabs.background = True
c.tabs.title.format = "{index} {audio}{perc}{current_title}"
c.tabs.position = "right"
c.tabs.width = "15%"
c.tabs.show = "multiple"
c.tabs.show_switching_delay = 2000
c.statusbar.show = "always"
c.fonts.default_family = "Iosevka"
c.fonts.web.family.fixed = "Iosevka"
c.fonts.web.family.standard = "Iosevka"
c.colors.webpage.bg = "#555555"
# Prevents *all* tabs from being loaded on restore, only loads on activating them
c.session.lazy_restore = True
# for code_select.py userscript
# Allows copying code sections to clipboard easily
c.hints.selectors["code"] = [
# Selects all code tags whose direct parent is not a pre tag
":not(pre) > code",
"pre",
]
# give the browser nice theme colors
state_dir = os.environ.get("XDG_STATE_HOME", f"{os.environ['HOME']}/.local/state")
colorscheme = f"{state_dir}/qutebrowser/colorscheme.py"
if os.path.isfile(colorscheme):
config.source(colorscheme)
c.url.start_pages = "https://start.duckduckgo.com/html"