config.py 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. # Autogenerated config.py
  2. #
  3. # NOTE: config.py is intended for advanced users who are comfortable
  4. # with manually migrating the config file on qutebrowser upgrades. If
  5. # you prefer, you can also configure qutebrowser using the
  6. # :set/:bind/:config-* commands without having to write a config.py
  7. # file.
  8. #
  9. # Documentation:
  10. # qute://help/configuring.html
  11. # qute://help/settings.html
  12. #!/usr/bin/env python3
  13. # -*- coding: utf-8 -*-
  14. import os
  15. # import gruvbox
  16. # import adblock
  17. ## Block YouTube Advertisements
  18. # from qutebrowser.api import interceptor
  19. #
  20. #
  21. # def filter_yt(info: interceptor.request):
  22. # url = info.request_url
  23. # if (
  24. # url.host() == "www.youtube.com"
  25. # and url.path() == "/get_video_info"
  26. # and "&adformat=" in url.query()
  27. # ):
  28. # info.block()
  29. #
  30. #
  31. # interceptor.register(filter_yt)
  32. home = os.path.expanduser("~")
  33. # # gruvbox dark hard qutebrowser theme by Florian Bruhin <me@the-compiler.org>
  34. # #
  35. # # Originally based on:
  36. # # base16-qutebrowser (https://github.com/theova/base16-qutebrowser)
  37. # # Base16 qutebrowser template by theova and Daniel Mulford
  38. # # Gruvbox dark, hard scheme by Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
  39. #
  40. # bg0_hard = "#1d2021"
  41. # bg0_soft = '#32302f'
  42. # bg0_normal = '#282828'
  43. #
  44. # bg0 = bg0_normal
  45. # bg1 = "#3c3836"
  46. # bg2 = "#504945"
  47. # bg3 = "#665c54"
  48. # bg4 = "#7c6f64"
  49. #
  50. # fg0 = "#fbf1c7"
  51. # fg1 = "#ebdbb2"
  52. # fg2 = "#d5c4a1"
  53. # fg3 = "#bdae93"
  54. # fg4 = "#a89984"
  55. #
  56. # bright_red = "#fb4934"
  57. # bright_green = "#b8bb26"
  58. # bright_yellow = "#fabd2f"
  59. # bright_blue = "#83a598"
  60. # bright_purple = "#d3869b"
  61. # bright_aqua = "#8ec07c"
  62. # bright_gray = "#928374"
  63. # bright_orange = "#fe8019"
  64. #
  65. # dark_red = "#cc241d"
  66. # dark_green = "#98971a"
  67. # dark_yellow = "#d79921"
  68. # dark_blue = "#458588"
  69. # dark_purple = "#b16286"
  70. # dark_aqua = "#689d6a"
  71. # dark_gray = "#a89984"
  72. # dark_orange = "#d65d0e"
  73. #
  74. # ### Completion
  75. #
  76. # # Text color of the completion widget. May be a single color to use for
  77. # # all columns or a list of three colors, one for each column.
  78. # c.colors.completion.fg = [fg1, bright_aqua, bright_yellow]
  79. #
  80. # # Background color of the completion widget for odd rows.
  81. # c.colors.completion.odd.bg = bg0
  82. #
  83. # # Background color of the completion widget for even rows.
  84. # c.colors.completion.even.bg = c.colors.completion.odd.bg
  85. #
  86. # # Foreground color of completion widget category headers.
  87. # c.colors.completion.category.fg = bright_blue
  88. #
  89. # # Background color of the completion widget category headers.
  90. # c.colors.completion.category.bg = bg1
  91. #
  92. # # Top border color of the completion widget category headers.
  93. # c.colors.completion.category.border.top = c.colors.completion.category.bg
  94. #
  95. # # Bottom border color of the completion widget category headers.
  96. # c.colors.completion.category.border.bottom = c.colors.completion.category.bg
  97. #
  98. # # Foreground color of the selected completion item.
  99. # c.colors.completion.item.selected.fg = fg0
  100. #
  101. # # Background color of the selected completion item.
  102. # c.colors.completion.item.selected.bg = bg4
  103. #
  104. # # Top border color of the selected completion item.
  105. # c.colors.completion.item.selected.border.top = bg2
  106. #
  107. # # Bottom border color of the selected completion item.
  108. # c.colors.completion.item.selected.border.bottom = c.colors.completion.item.selected.border.top
  109. #
  110. # # Foreground color of the matched text in the selected completion item.
  111. # c.colors.completion.item.selected.match.fg = bright_orange
  112. #
  113. # # Foreground color of the matched text in the completion.
  114. # c.colors.completion.match.fg = c.colors.completion.item.selected.match.fg
  115. #
  116. # # Color of the scrollbar handle in the completion view.
  117. # c.colors.completion.scrollbar.fg = c.colors.completion.item.selected.fg
  118. #
  119. # # Color of the scrollbar in the completion view.
  120. # c.colors.completion.scrollbar.bg = c.colors.completion.category.bg
  121. #
  122. # ### Context menu
  123. #
  124. # # Background color of disabled items in the context menu.
  125. # c.colors.contextmenu.disabled.bg = bg3
  126. #
  127. # # Foreground color of disabled items in the context menu.
  128. # c.colors.contextmenu.disabled.fg = fg3
  129. #
  130. # # Background color of the context menu. If set to null, the Qt default is used.
  131. # c.colors.contextmenu.menu.bg = bg0
  132. #
  133. # # Foreground color of the context menu. If set to null, the Qt default is used.
  134. # c.colors.contextmenu.menu.fg = fg2
  135. #
  136. # # Background color of the context menu’s selected item. If set to null, the Qt default is used.
  137. # c.colors.contextmenu.selected.bg = bg2
  138. #
  139. # #Foreground color of the context menu’s selected item. If set to null, the Qt default is used.
  140. # c.colors.contextmenu.selected.fg = c.colors.contextmenu.menu.fg
  141. #
  142. # ### Downloads
  143. #
  144. # # Background color for the download bar.
  145. # c.colors.downloads.bar.bg = bg0
  146. #
  147. # # Color gradient start for download text.
  148. # c.colors.downloads.start.fg = bg0
  149. #
  150. # # Color gradient start for download backgrounds.
  151. # c.colors.downloads.start.bg = bright_blue
  152. #
  153. # # Color gradient end for download text.
  154. # c.colors.downloads.stop.fg = c.colors.downloads.start.fg
  155. #
  156. # # Color gradient stop for download backgrounds.
  157. # c.colors.downloads.stop.bg = bright_aqua
  158. #
  159. # # Foreground color for downloads with errors.
  160. # c.colors.downloads.error.fg = bright_red
  161. #
  162. # ### Hints
  163. #
  164. # # Font color for hints.
  165. # c.colors.hints.fg = bg0
  166. #
  167. # # Background color for hints.
  168. # c.colors.hints.bg = 'rgba(250, 191, 47, 200)' # bright_yellow
  169. #
  170. # # Font color for the matched part of hints.
  171. # c.colors.hints.match.fg = bg4
  172. #
  173. # ### Keyhint widget
  174. #
  175. # # Text color for the keyhint widget.
  176. # c.colors.keyhint.fg = fg4
  177. #
  178. # # Highlight color for keys to complete the current keychain.
  179. # c.colors.keyhint.suffix.fg = fg0
  180. #
  181. # # Background color of the keyhint widget.
  182. # c.colors.keyhint.bg = bg0
  183. #
  184. # ### Messages
  185. #
  186. # # Foreground color of an error message.
  187. # c.colors.messages.error.fg = bg0
  188. #
  189. # # Background color of an error message.
  190. # c.colors.messages.error.bg = bright_red
  191. #
  192. # # Border color of an error message.
  193. # c.colors.messages.error.border = c.colors.messages.error.bg
  194. #
  195. # # Foreground color of a warning message.
  196. # c.colors.messages.warning.fg = bg0
  197. #
  198. # # Background color of a warning message.
  199. # c.colors.messages.warning.bg = bright_purple
  200. #
  201. # # Border color of a warning message.
  202. # c.colors.messages.warning.border = c.colors.messages.warning.bg
  203. #
  204. # # Foreground color of an info message.
  205. # c.colors.messages.info.fg = fg2
  206. #
  207. # # Background color of an info message.
  208. # c.colors.messages.info.bg = bg0
  209. #
  210. # # Border color of an info message.
  211. # c.colors.messages.info.border = c.colors.messages.info.bg
  212. #
  213. # ### Prompts
  214. #
  215. # # Foreground color for prompts.
  216. # c.colors.prompts.fg = fg2
  217. #
  218. # # Border used around UI elements in prompts.
  219. # c.colors.prompts.border = f'1px solid {bg1}'
  220. #
  221. # # Background color for prompts.
  222. # c.colors.prompts.bg = bg3
  223. #
  224. # # Background color for the selected item in filename prompts.
  225. # c.colors.prompts.selected.bg = bg2
  226. #
  227. # ### Statusbar
  228. #
  229. # # Foreground color of the statusbar.
  230. # c.colors.statusbar.normal.fg = fg2
  231. #
  232. # # Background color of the statusbar.
  233. # c.colors.statusbar.normal.bg = bg0
  234. #
  235. # # Foreground color of the statusbar in insert mode.
  236. # c.colors.statusbar.insert.fg = bg0
  237. #
  238. # # Background color of the statusbar in insert mode.
  239. # c.colors.statusbar.insert.bg = dark_aqua
  240. #
  241. # # Foreground color of the statusbar in passthrough mode.
  242. # c.colors.statusbar.passthrough.fg = bg0
  243. #
  244. # # Background color of the statusbar in passthrough mode.
  245. # c.colors.statusbar.passthrough.bg = dark_blue
  246. #
  247. # # Foreground color of the statusbar in private browsing mode.
  248. # c.colors.statusbar.private.fg = bright_purple
  249. #
  250. # # Background color of the statusbar in private browsing mode.
  251. # c.colors.statusbar.private.bg = bg0
  252. #
  253. # # Foreground color of the statusbar in command mode.
  254. # c.colors.statusbar.command.fg = fg3
  255. #
  256. # # Background color of the statusbar in command mode.
  257. # c.colors.statusbar.command.bg = bg1
  258. #
  259. # # Foreground color of the statusbar in private browsing + command mode.
  260. # c.colors.statusbar.command.private.fg = c.colors.statusbar.private.fg
  261. #
  262. # # Background color of the statusbar in private browsing + command mode.
  263. # c.colors.statusbar.command.private.bg = c.colors.statusbar.command.bg
  264. #
  265. # # Foreground color of the statusbar in caret mode.
  266. # c.colors.statusbar.caret.fg = bg0
  267. #
  268. # # Background color of the statusbar in caret mode.
  269. # c.colors.statusbar.caret.bg = dark_purple
  270. #
  271. # # Foreground color of the statusbar in caret mode with a selection.
  272. # c.colors.statusbar.caret.selection.fg = c.colors.statusbar.caret.fg
  273. #
  274. # # Background color of the statusbar in caret mode with a selection.
  275. # c.colors.statusbar.caret.selection.bg = bright_purple
  276. #
  277. # # Background color of the progress bar.
  278. # c.colors.statusbar.progress.bg = bright_blue
  279. #
  280. # # Default foreground color of the URL in the statusbar.
  281. # c.colors.statusbar.url.fg = fg4
  282. #
  283. # # Foreground color of the URL in the statusbar on error.
  284. # c.colors.statusbar.url.error.fg = dark_red
  285. #
  286. # # Foreground color of the URL in the statusbar for hovered links.
  287. # c.colors.statusbar.url.hover.fg = bright_orange
  288. #
  289. # # Foreground color of the URL in the statusbar on successful load
  290. # # (http).
  291. # c.colors.statusbar.url.success.http.fg = bright_red
  292. #
  293. # # Foreground color of the URL in the statusbar on successful load
  294. # # (https).
  295. # c.colors.statusbar.url.success.https.fg = fg0
  296. #
  297. # # Foreground color of the URL in the statusbar when there's a warning.
  298. # c.colors.statusbar.url.warn.fg = bright_purple
  299. #
  300. # ### tabs
  301. #
  302. # # Background color of the tab bar.
  303. # c.colors.tabs.bar.bg = bg0
  304. #
  305. # # Color gradient start for the tab indicator.
  306. # c.colors.tabs.indicator.start = bright_blue
  307. #
  308. # # Color gradient end for the tab indicator.
  309. # c.colors.tabs.indicator.stop = bright_aqua
  310. #
  311. # # Color for the tab indicator on errors.
  312. # c.colors.tabs.indicator.error = bright_red
  313. #
  314. # # Foreground color of unselected odd tabs.
  315. # c.colors.tabs.odd.fg = fg2
  316. #
  317. # # Background color of unselected odd tabs.
  318. # c.colors.tabs.odd.bg = bg2
  319. #
  320. # # Foreground color of unselected even tabs.
  321. # c.colors.tabs.even.fg = c.colors.tabs.odd.fg
  322. #
  323. # # Background color of unselected even tabs.
  324. # c.colors.tabs.even.bg = bg3
  325. #
  326. # # Foreground color of selected odd tabs.
  327. # c.colors.tabs.selected.odd.fg = fg2
  328. #
  329. # # Background color of selected odd tabs.
  330. # c.colors.tabs.selected.odd.bg = bg0
  331. #
  332. # # Foreground color of selected even tabs.
  333. # c.colors.tabs.selected.even.fg = c.colors.tabs.selected.odd.fg
  334. #
  335. # # Background color of selected even tabs.
  336. # c.colors.tabs.selected.even.bg = bg0
  337. #
  338. # # Background color of pinned unselected even tabs.
  339. # c.colors.tabs.pinned.even.bg = bright_green
  340. #
  341. # # Foreground color of pinned unselected even tabs.
  342. # c.colors.tabs.pinned.even.fg = bg2
  343. #
  344. # # Background color of pinned unselected odd tabs.
  345. # c.colors.tabs.pinned.odd.bg = bright_green
  346. #
  347. # # Foreground color of pinned unselected odd tabs.
  348. # c.colors.tabs.pinned.odd.fg = c.colors.tabs.pinned.even.fg
  349. #
  350. # # Background color of pinned selected even tabs.
  351. # c.colors.tabs.pinned.selected.even.bg = bg0
  352. #
  353. # # Foreground color of pinned selected even tabs.
  354. # c.colors.tabs.pinned.selected.even.fg = c.colors.tabs.selected.odd.fg
  355. #
  356. # # Background color of pinned selected odd tabs.
  357. # c.colors.tabs.pinned.selected.odd.bg = c.colors.tabs.pinned.selected.even.bg
  358. #
  359. # # Foreground color of pinned selected odd tabs.
  360. # c.colors.tabs.pinned.selected.odd.fg = c.colors.tabs.selected.odd.fg
  361. #
  362. # # Background color for webpages if unset (or empty to use the theme's
  363. # # color).
  364. # c.colors.webpage.bg = bg4
  365. # ### End of gruvbox
  366. # Change the argument to True to still load settings configured via autoconfig.yml
  367. config.load_autoconfig(False)
  368. # Aliases for commands. The keys of the given dictionary are the
  369. # aliases, while the values are the commands they map to.
  370. # Type: Dict
  371. c.aliases = {"q": "quit", "w": "session-save", "wq": "quit --save"}
  372. # Setting dark mode
  373. # config.set("colors.webpage.darkmode.enabled", True)
  374. # Adblock
  375. # print(str(config.configdir / 'config.py'))
  376. c.content.blocking.adblock.lists = [
  377. "https://easylist.to/easylist/easylist.txt",
  378. "https://easylist.to/easylist/easyprivacy.txt",
  379. "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt",
  380. "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt",
  381. "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/legacy.txt",
  382. "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt",
  383. "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt",
  384. "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt",
  385. "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext&_=223428",
  386. "https://raw.githubusercontent.com/brave/adblock-lists/master/brave-lists/brave-social.txt",
  387. "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt",
  388. "https://raw.githubusercontent.com/brave/adblock-lists/master/brave-unbreak.txt"]
  389. # Which cookies to accept. With QtWebEngine, this setting also controls
  390. # other features with tracking capabilities similar to those of cookies;
  391. # including IndexedDB, DOM storage, filesystem API, service workers, and
  392. # AppCache. Note that with QtWebKit, only `all` and `never` are
  393. # supported as per-domain values. Setting `no-3rdparty` or `no-
  394. # unknown-3rdparty` per-domain on QtWebKit will have the same effect as
  395. # `all`. If this setting is used with URL patterns, the pattern gets
  396. # applied to the origin/first party URL of the page making the request,
  397. # not the request URL.
  398. # Type: String
  399. # Valid values:
  400. # - all: Accept all cookies.
  401. # - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
  402. # - 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.
  403. # - never: Don't accept cookies at all.
  404. config.set("content.cookies.accept", "all", "chrome-devtools://*")
  405. # config.set("content.cookies.accept", "no-unknown-3rdparty", "chrome-devtools://*")
  406. # Which cookies to accept. With QtWebEngine, this setting also controls
  407. # other features with tracking capabilities similar to those of cookies;
  408. # including IndexedDB, DOM storage, filesystem API, service workers, and
  409. # AppCache. Note that with QtWebKit, only `all` and `never` are
  410. # supported as per-domain values. Setting `no-3rdparty` or `no-
  411. # unknown-3rdparty` per-domain on QtWebKit will have the same effect as
  412. # `all`. If this setting is used with URL patterns, the pattern gets
  413. # applied to the origin/first party URL of the page making the request,
  414. # not the request URL.
  415. # Type: String
  416. # Valid values:
  417. # - all: Accept all cookies.
  418. # - no-3rdparty: Accept cookies from the same origin only. This is known to break some sites, such as GMail.
  419. # - 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.
  420. # - never: Don't accept cookies at all.
  421. config.set("content.cookies.accept", "all", "devtools://*")
  422. # User agent to send. The following placeholders are defined: *
  423. # `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
  424. # The underlying WebKit version (set to a fixed value with
  425. # QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
  426. # QtWebEngine. * `{qt_version}`: The underlying Qt version. *
  427. # `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
  428. # QtWebEngine. * `{upstream_browser_version}`: The corresponding
  429. # Safari/Chrome version. * `{qutebrowser_version}`: The currently
  430. # running qutebrowser version. The default value is equal to the
  431. # unchanged user agent of QtWebKit/QtWebEngine. Note that the value
  432. # read from JavaScript is always the global value. With QtWebEngine
  433. # between 5.12 and 5.14 (inclusive), changing the value exposed to
  434. # JavaScript requires a restart.
  435. # Type: FormatString
  436. 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/")
  437. # User agent to send. The following placeholders are defined: *
  438. # `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
  439. # The underlying WebKit version (set to a fixed value with
  440. # QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
  441. # QtWebEngine. * `{qt_version}`: The underlying Qt version. *
  442. # `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
  443. # QtWebEngine. * `{upstream_browser_version}`: The corresponding
  444. # Safari/Chrome version. * `{qutebrowser_version}`: The currently
  445. # running qutebrowser version. The default value is equal to the
  446. # unchanged user agent of QtWebKit/QtWebEngine. Note that the value
  447. # read from JavaScript is always the global value. With QtWebEngine
  448. # between 5.12 and 5.14 (inclusive), changing the value exposed to
  449. # JavaScript requires a restart.
  450. # Type: FormatString
  451. 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/*")
  452. # User agent to send. The following placeholders are defined: *
  453. # `{os_info}`: Something like "X11; Linux x86_64". * `{webkit_version}`:
  454. # The underlying WebKit version (set to a fixed value with
  455. # QtWebEngine). * `{qt_key}`: "Qt" for QtWebKit, "QtWebEngine" for
  456. # QtWebEngine. * `{qt_version}`: The underlying Qt version. *
  457. # `{upstream_browser_key}`: "Version" for QtWebKit, "Chrome" for
  458. # QtWebEngine. * `{upstream_browser_version}`: The corresponding
  459. # Safari/Chrome version. * `{qutebrowser_version}`: The currently
  460. # running qutebrowser version. The default value is equal to the
  461. # unchanged user agent of QtWebKit/QtWebEngine. Note that the value
  462. # read from JavaScript is always the global value. With QtWebEngine
  463. # between 5.12 and 5.14 (inclusive), changing the value exposed to
  464. # JavaScript requires a restart.
  465. # Type: FormatString
  466. 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/*")
  467. # Load images automatically in web pages.
  468. # Type: Bool
  469. config.set("content.images", True, "chrome-devtools://*")
  470. # Load images automatically in web pages.
  471. # Type: Bool
  472. config.set("content.images", True, "devtools://*")
  473. # Enable JavaScript.
  474. # Type: Bool
  475. config.set("content.javascript.enabled", True, "chrome-devtools://*")
  476. # Enable JavaScript.
  477. # Type: Bool
  478. config.set("content.javascript.enabled", True, "devtools://*")
  479. # Enable JavaScript.
  480. # Type: Bool
  481. config.set("content.javascript.enabled", True, "chrome://*/*")
  482. # Enable JavaScript.
  483. # Type: Bool
  484. config.set("content.javascript.enabled", True, "qute://*/*")
  485. # DT's settings
  486. # Allow websites to show notifications.
  487. # Type: BoolAsk
  488. # Valid values:
  489. # - true
  490. # - false
  491. # - ask
  492. config.set("content.notifications.enabled", True, "https://www.reddit.com")
  493. # Allow websites to show notifications.
  494. # Type: BoolAsk
  495. # Valid values:
  496. # - true
  497. # - false
  498. # - ask
  499. config.set("content.notifications.enabled", True, "https://www.youtube.com")
  500. # Directory to save downloads to. If unset, a sensible OS-specific
  501. # default is used.
  502. # Type: Directory
  503. c.downloads.location.directory = home + "/Downloads"
  504. # When to show the tab bar.
  505. # Type: String
  506. # Valid values:
  507. # - always: Always show the tab bar.
  508. # - never: Always hide the tab bar.
  509. # - multiple: Hide the tab bar if only one tab is open.
  510. # - switching: Show the tab bar when switching tabs.
  511. c.tabs.show = "always"
  512. # Setting default page for when opening new tabs or new windows with
  513. # commands like :open -t and :open -w .
  514. c.url.default_page = "file:///{}/.surf/html/homepage.html".format(home)
  515. # c.url.default_page = "file:///home/dt/.surf/html/homepage.html"
  516. # Search engines which can be used via the address bar. Maps a search
  517. # engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
  518. # placeholder. The placeholder will be replaced by the search term, use
  519. # `{{` and `}}` for literal `{`/`}` braces. The following further
  520. # placeholds are defined to configure how special characters in the
  521. # search terms are replaced by safe characters (called 'quoting'): *
  522. # `{}` and `{semiquoted}` quote everything except slashes; this is the
  523. # most sensible choice for almost all search engines (for the search
  524. # term `slash/and&amp` this placeholder expands to `slash/and%26amp`).
  525. # * `{quoted}` quotes all characters (for `slash/and&amp` this
  526. # placeholder expands to `slash%2Fand%26amp`). * `{unquoted}` quotes
  527. # nothing (for `slash/and&amp` this placeholder expands to
  528. # `slash/and&amp`). The search engine named `DEFAULT` is used when
  529. # `url.auto_search` is turned on and something else than a URL was
  530. # entered to be opened. Other search engines can be used by prepending
  531. # the search engine name to the search term, e.g. `:open google
  532. # qutebrowser`.
  533. # Type: Dict
  534. c.url.searchengines = {"DEFAULT": "https://duckduckgo.com/?q={}", "ddg": "https://duckduckgo.com/?q={}", "aw": "https://wiki.archlinux.org/?search={}", "goog": "https://www.google.com/search?q={}", "hoog": "https://hoogle.haskell.org/?hoogle={}", "re": "https://www.reddit.com/r/{}", "ub": "https://www.urbandictionary.com/define.php?term={}", "wiki": "https://en.wikipedia.org/wiki/{}", "yt": "https://www.youtube.com/results?search_query={}"}
  535. # Text color of the completion widget. May be a single color to use for
  536. # all columns or a list of three colors, one for each column.
  537. # Type: List of QtColor, or QtColor
  538. c.colors.completion.fg = ["#24d2af", "white", "white"]
  539. # c.colors.completion.fg = ["#9cc4ff", "white", "white"]
  540. # Background color of the completion widget for odd rows.
  541. # Type: QssColor
  542. c.colors.completion.odd.bg = "#1c1f24"
  543. # Background color of the completion widget for even rows.
  544. # Type: QssColor
  545. c.colors.completion.even.bg = "#232429"
  546. # Foreground color of completion widget category headers.
  547. # Type: QtColor
  548. c.colors.completion.category.fg = "#f2b06a"
  549. # c.colors.completion.category.fg = "#e1acff"
  550. # Background color of the completion widget category headers.
  551. # Type: QssColor
  552. c.colors.completion.category.bg = "qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #000000, stop:1 #232429)"
  553. # Top border color of the completion widget category headers.
  554. # Type: QssColor
  555. c.colors.completion.category.border.top = "#3f4147"
  556. # Bottom border color of the completion widget category headers.
  557. # Type: QssColor
  558. c.colors.completion.category.border.bottom = "#3f4147"
  559. # Foreground color of the selected completion item.
  560. # Type: QtColor
  561. c.colors.completion.item.selected.fg = "#282c34"
  562. # Background color of the selected completion item.
  563. # Type: QssColor
  564. c.colors.completion.item.selected.bg = "#009185"
  565. # c.colors.completion.item.selected.bg = "#497950"
  566. # c.colors.completion.item.selected.bg = "#497990"
  567. # Foreground color of the matched text in the selected completion item.
  568. # Type: QtColor
  569. c.colors.completion.item.selected.match.fg = "#ffb62c"
  570. # c.colors.completion.item.selected.match.fg = "#c678dd"
  571. # Foreground color of the matched text in the completion.
  572. # Type: QtColor
  573. c.colors.completion.match.fg = "#ffb62c"
  574. # c.colors.completion.match.fg = "#c678dd"
  575. # Color of the scrollbar handle in the completion view.
  576. # Type: QssColor
  577. c.colors.completion.scrollbar.fg = "white"
  578. # Background color for the download bar.
  579. # Type: QssColor
  580. c.colors.downloads.bar.bg = "#282c34"
  581. # Background color for downloads with errors.
  582. # Type: QtColor
  583. c.colors.downloads.error.bg = "#ff6c6b"
  584. # Font color for hints.
  585. # Type: QssColor
  586. c.colors.hints.fg = "#282c34"
  587. # Font color for the matched part of hints.
  588. # Type: QtColor
  589. c.colors.hints.match.fg = "#98be65"
  590. # Background color of an info message.
  591. # Type: QssColor
  592. c.colors.messages.info.bg = "#282c34"
  593. # Background color of the statusbar.
  594. # Type: QssColor
  595. c.colors.statusbar.normal.bg = "#282c34"
  596. # Foreground color of the statusbar in insert mode.
  597. # Type: QssColor
  598. c.colors.statusbar.insert.fg = "white"
  599. # Background color of the statusbar in insert mode.
  600. # Type: QssColor
  601. c.colors.statusbar.insert.bg = "#497920"
  602. # Background color of the statusbar in passthrough mode.
  603. # Type: QssColor
  604. c.colors.statusbar.passthrough.bg = "#34426f"
  605. # Background color of the statusbar in command mode.
  606. # Type: QssColor
  607. c.colors.statusbar.command.bg = "#282c34"
  608. # Foreground color of the URL in the statusbar when there's a warning.
  609. # Type: QssColor
  610. c.colors.statusbar.url.warn.fg = "yellow"
  611. # Background color of the tab bar.
  612. # Type: QssColor
  613. c.colors.tabs.bar.bg = "#1c1f34"
  614. # Background color of unselected odd tabs.
  615. # Type: QtColor
  616. c.colors.tabs.odd.bg = "#282c34"
  617. # Background color of unselected even tabs.
  618. # Type: QtColor
  619. c.colors.tabs.even.bg = "#282c34"
  620. # Background color of selected odd tabs.
  621. # Type: QtColor
  622. c.colors.tabs.selected.odd.bg = "#282c34"
  623. # Background color of selected even tabs.
  624. # Type: QtColor
  625. c.colors.tabs.selected.even.bg = "#282c34"
  626. # Background color of pinned unselected odd tabs.
  627. # Type: QtColor
  628. c.colors.tabs.pinned.odd.bg = "seagreen"
  629. # Background color of pinned unselected even tabs.
  630. # Type: QtColor
  631. c.colors.tabs.pinned.even.bg = "darkseagreen"
  632. # Background color of pinned selected odd tabs.
  633. # Type: QtColor
  634. c.colors.tabs.pinned.selected.odd.bg = "#282c34"
  635. # Background color of pinned selected even tabs.
  636. # Type: QtColor
  637. c.colors.tabs.pinned.selected.even.bg = "#282c34"
  638. # Default font families to use. Whenever "default_family" is used in a
  639. # font setting, it's replaced with the fonts listed here. If set to an
  640. # empty value, a system-specific monospace default is used.
  641. # Type: List of Font, or Font
  642. c.fonts.default_family = "Ubuntu"
  643. # c.fonts.default_family = "UbuntuMono Nerd Font"
  644. # c.fonts.default_family = ""SauceCodePro Nerd Font""
  645. # Default font size to use. Whenever "default_size" is used in a font
  646. # setting, it's replaced with the size listed here. Valid values are
  647. # either a float value with a "pt" suffix, or an integer value with a
  648. # "px" suffix.
  649. # Type: String
  650. c.fonts.default_size = "12pt"
  651. # Font used in the completion widget.
  652. # Type: Font
  653. c.fonts.completion.entry = "12pt Ubuntu"
  654. # c.fonts.completion.entry = "11pt "SauceCodePro Nerd Font""
  655. # Font used for the debugging console.
  656. # Type: Font
  657. c.fonts.debug_console = "12pt UbuntuMono Nerd Font"
  658. # Font used for prompts.
  659. # Type: Font
  660. c.fonts.prompts = "default_size sans-serif"
  661. # Font used in the statusbar.
  662. # Type: Font
  663. c.fonts.statusbar = "12pt Ubuntu"
  664. # Font used for messages.
  665. # Type: Font
  666. c.fonts.messages.info = "12pt Ubuntu"
  667. c.fonts.messages.warning = "12pt Ubuntu"
  668. c.fonts.messages.error = "12pt Ubuntu"
  669. # Bindings to use dmenu rather than qutebrowser's builtin search.
  670. #config.bind("o", "spawn --userscript dmenu-open")
  671. #config.bind("O", "spawn --userscript dmenu-open --tab")
  672. # Bindings for normal mode
  673. config.bind("M", "hint links spawn freetube {hint-url}")
  674. # config.bind("M", "hint links spawn --detach mpv --force-window yes {hint-url}")
  675. config.bind("Z", "hint links spawn alacritty -e youtube-dl {hint-url}")
  676. config.bind("t", "set-cmd-text -s :open -t")
  677. config.bind("xb", "config-cycle statusbar.show always never")
  678. config.bind("xt", "config-cycle tabs.show always never")
  679. config.bind("xx", "config-cycle statusbar.show always never;; config-cycle tabs.show always never")
  680. config.bind("J", ":tab-prev")
  681. config.bind("K", ":tab-next")
  682. # config.unbind("f")
  683. # config.bind(",f", ":hint")
  684. config.bind("Sa", "bookmark-add")
  685. # Bindings for cycling through CSS stylesheets from Solarized Everything CSS:
  686. # https://github.com/alphapapa/solarized-everything-css
  687. config.bind(",ap", "config-cycle content.user_stylesheets ~/.config/qutebrowser/solarized-everything-css/css/apprentice/apprentice-all-sites.css ''")
  688. config.bind(",dr", "config-cycle content.user_stylesheets ~/.config/qutebrowser/solarized-everything-css/css/darculized/darculized-all-sites.css ''")
  689. config.bind(",gr", "config-cycle content.user_stylesheets ~/.config/qutebrowser/solarized-everything-css/css/gruvbox/gruvbox-all-sites.css ''")
  690. config.bind(",sd", "config-cycle content.user_stylesheets ~/.config/qutebrowser/solarized-everything-css/css/solarized-dark/solarized-dark-all-sites.css ''")
  691. config.bind(",sl", "config-cycle content.user_stylesheets ~/.config/qutebrowser/solarized-everything-css/css/solarized-light/solarized-light-all-sites.css ''")