config.py - dotfiles - These are my dotfiles. There are many like it, but these are mine.
(HTM) git clone git://jay.scot/dotfiles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
config.py (3596B)
---
1 config.load_autoconfig(False)
2
3 try:
4 from qutebrowser.api import message
5
6 # gruvbox colour theme
7 config.source('scripts/gruvbox.py')
8 #config.source('scripts/redirects.py')
9
10 except ImportError:
11 pass
12
13 # default local page
14 DEFAULT_PAGE = str(config.configdir / 'blank.html')
15
16 # keybinds remapping
17 config.bind("xx", "set tabs.show always;; later 5000 set tabs.show switching")
18 config.bind("xc", "spawn --userscript password_fill")
19 config.bind("zd", "download-open")
20 config.bind("xz", "hint links spawn --detach ~/bin/link-handler {hint-url}")
21 config.bind("j", "cmd-run-with-count 5 scroll down")
22 config.bind("k", "cmd-run-with-count 5 scroll up")
23
24 # tabbar
25 c.tabs.position = "top"
26 c.tabs.show = "multiple"
27 c.tabs.title.format = ""
28 c.tabs.width = 28
29 c.tabs.favicons.show = "never"
30
31 # hints
32 c.colors.hints.bg = "rgb(207,186,88)" #cfba58
33 c.colors.hints.fg = "rgb(34, 34, 34)" #222222
34
35 # darkmode
36 c.colors.webpage.darkmode.enabled = True
37 c.colors.webpage.darkmode.algorithm = 'lightness-cielab'
38 c.colors.webpage.darkmode.policy.images = 'never'
39 config.set('colors.webpage.darkmode.enabled', False, 'file://*')
40
41 # misc
42 c.fonts.hints = "14pt Hack"
43 c.fonts.default_size = '12pt'
44 c.fonts.default_family = 'Hack'
45 c.hints.uppercase = True
46 c.scrolling.smooth = True
47 c.editor.command = ["foot", "vim '{}'"]
48 c.auto_save.session = True
49 c.zoom.default = "140%"
50
51 # ad-block
52 c.content.blocking.enabled = True
53 c.content.blocking.method = "both"
54 c.content.blocking.adblock.lists = [
55 "https://easylist.to/easylist/easyprivacy.txt",
56 "https://secure.fanboy.co.nz/fanboy-cookiemonster.txt",
57 "https://easylist.to/easylist/easylist.txt"
58 ]
59
60 # general privacy
61 c.completion.web_history.max_items = 0 # no history
62 c.downloads.remove_finished = 800 # clear dl history
63 c.downloads.location.directory = '~/tmp'
64 c.url.default_page = DEFAULT_PAGE
65 c.url.start_pages = DEFAULT_PAGE
66 c.content.private_browsing = True # always use private browsing
67 c.content.register_protocol_handler = False
68 c.content.webgl = False
69
70 # normally default, lets make sure
71 c.content.media.audio_capture = False
72 c.content.media.audio_video_capture = False
73 c.content.media.video_capture = False
74 c.content.desktop_capture = False
75 c.content.mouse_lock = False
76 c.content.autoplay = False # no autoplay on <video> tags
77
78 # fingerprint
79 c.content.headers.accept_language = "en-US,en;q=0.5"
80 c.content.headers.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
81 c.content.headers.custom = {"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}
82 c.content.headers.referer = "never"
83 c.content.cookies.accept = "no-3rdparty"
84 c.content.javascript.enabled = False # disable tracking etc
85 c.content.canvas_reading = False # canvas blocking
86 c.content.geolocation = False # location ident
87 c.content.webrtc_ip_handling_policy = "disable-non-proxied-udp"
88 c.content.hyperlink_auditing = False # disable pingbacks
89 c.content.dns_prefetch = False # disable dns pre-fetching
90
91 # search engine shortneners
92 c.url.searchengines = {
93 "DEFAULT": "https://html.duckduckgo.com/html?q={}",
94 "ru": "https://rutracker.org/forum/tracker.php?f=1992&nm={}",
95 "wiby": "https://wiby.me/?q={}",
96 "!book": "http://libgen.li/search.php?req={}&lg_topic=libgen&open=0&view=simple&res=25&phrase=1&column=def",
97 "!wiki": "https://en.wikipedia.org/wiki/Special:Search?search={}",
98 }
99
100 # javascript whitelist
101 js_whitelist = [
102 "*://localhost/*",
103 "*://127.0.0.1/*"
104 ]
105
106 for site in js_whitelist:
107 with config.pattern(site) as p:
108 p.content.javascript.enabled = True