62 lines
1.7 KiB
Python
62 lines
1.7 KiB
Python
import os
|
|
|
|
import dracula.draw
|
|
|
|
def get_bangs():
|
|
bangs = {}
|
|
config_home = os.environ.get('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
|
|
bangs_file = os.path.join(config_home, 'qutebrowser', 'bangs.txt')
|
|
with open(bangs_file) as f:
|
|
for line in f:
|
|
key, value = line.strip().split(' ', maxsplit=1)
|
|
bangs[key] = value
|
|
return bangs
|
|
|
|
def init(c):
|
|
c.auto_save.session = True
|
|
|
|
#c.colors.webpage.darkmode.enabled = True
|
|
#c.colors.webpage.darkmode.policy.images = 'never'
|
|
c.colors.webpage.preferred_color_scheme = 'dark'
|
|
|
|
#c.content.proxy = "socks://localhost:9050/"
|
|
c.content.headers.accept_language = "en-US,en;q=0.5"
|
|
c.content.pdfjs = True
|
|
c.content.tls.certificate_errors = 'block'
|
|
|
|
c.downloads.position = 'bottom'
|
|
|
|
c.fonts.hints = 'bold 18px default_family'
|
|
|
|
c.session.default_name = 'autosave'
|
|
|
|
c.tabs.background = True
|
|
c.tabs.mousewheel_switching = False
|
|
c.tabs.new_position.related = 'last'
|
|
c.tabs.pinned.frozen = True
|
|
|
|
c.qt.workarounds.remove_service_workers = True
|
|
|
|
search_engines = {
|
|
'ddg': 'https://duckduckgo.com/?q={}',
|
|
'ecosia': 'https://www.ecosia.org/search?q={}',
|
|
'qwant': 'https://www.qwant.com/?q={}',
|
|
}
|
|
search_engines['DEFAULT'] = search_engines['ddg']
|
|
c.url.searchengines = search_engines | get_bangs()
|
|
|
|
c.url.start_pages = [
|
|
'https://rss.serguzim.me/',
|
|
'http://homeassistant-33:8123/',
|
|
'https://status.serguzim.net/'
|
|
'https://open.spotify.com/'
|
|
]
|
|
|
|
c.zoom.mouse_divider = 0
|
|
|
|
dracula.draw.blood(c, {
|
|
'spacing': {
|
|
'vertical': 1,
|
|
'horizontal': 3
|
|
}
|
|
})
|