2020-05-31 10:24:52 +02:00
|
|
|
from qutebrowser.config.configfiles import ConfigAPI
|
|
|
|
from qutebrowser.config.config import ConfigContainer
|
|
|
|
|
|
|
|
import sys, os
|
|
|
|
|
|
|
|
config = config
|
|
|
|
c = c
|
|
|
|
|
2023-03-30 14:14:54 +02:00
|
|
|
config.set('colors.webpage.darkmode.enabled', False)
|
2022-01-19 09:07:26 +01:00
|
|
|
|
2021-02-26 09:10:57 +01:00
|
|
|
config.load_autoconfig()
|
|
|
|
|
2020-05-31 10:24:52 +02:00
|
|
|
c.qt.args = ["blink-settings=darkMode=1"]
|
|
|
|
c.auto_save.session = True
|
|
|
|
|
|
|
|
# Bindings
|
2022-10-26 18:15:16 +02:00
|
|
|
#config.bind('o', 'set-cmd-text -s :open', mode='normal')
|
|
|
|
#config.bind('O', 'set-cmd-text -s :open {url:pretty}', mode='normal')
|
|
|
|
#config.bind('w', 'set-cmd-text -s :open -t', mode='normal')
|
|
|
|
#config.bind('W', 'set-cmd-text -s :open -t {url:pretty}', mode='normal')
|
|
|
|
#config.bind('Fy', 'hint links yank-primary', mode='normal')
|
|
|
|
#config.bind('yy', 'yank -s', mode='normal')
|
|
|
|
config.bind(',vl', 'hint links spawn --detach mpv --script-opts=ytdl_hook-ytdl_path=yt-dlp --ytdl-raw-options=format-sort=height:480 {hint-url}', mode='normal')
|
|
|
|
config.bind(',Vl', 'spawn --detach mpv --script-opts=ytdl_hook-ytdl_path=yt-dlp --ytdl-raw-options=format-sort=height:480 {url}', mode='normal')
|
|
|
|
config.bind(',vh', 'hint links spawn --detach mpv --script-opts=ytdl_hook-ytdl_path=yt-dlp --ytdl-raw-options=format-sort=height:1080 {hint-url}', mode='normal')
|
|
|
|
config.bind(',Vh', 'spawn --detach mpv --script-opts=ytdl_hook-ytdl_path=yt-dlp --ytdl-raw-options=format-sort=height:1080 {url}', mode='normal')
|
|
|
|
config.bind(',a', 'hint links spawn --detach mpv --script-opts=ytdl_hook-ytdl_path=yt-dlp --no-video --force-window=yes {hint-url}', mode='normal')
|
|
|
|
config.bind(',A', 'spawn --detach mpv --script-opts=ytdl_hook-ytdl_path=yt-dlp --no-video --force-window=yes {url}', mode='normal')
|
|
|
|
#config.unbind('F')
|
2020-05-31 10:24:52 +02:00
|
|
|
config.bind('<Backspace>', 'back', mode='normal')
|
|
|
|
config.bind('<Shift-Backspace>', 'forward', mode='normal')
|
2020-06-04 08:31:58 +02:00
|
|
|
config.bind('<Control-Tab>', 'tab-next', mode='normal')
|
|
|
|
config.bind('<Control-Shift-Tab>', 'tab-prev', mode='normal')
|
2020-05-31 10:24:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Config perso
|
2023-03-30 14:14:54 +02:00
|
|
|
c.editor.command = ["vim {}"]
|
2020-05-31 10:24:52 +02:00
|
|
|
c.zoom.default = 100
|
|
|
|
c.messages.timeout = 10000
|
|
|
|
c.downloads.remove_finished = 30000
|
|
|
|
c.content.headers.do_not_track = True
|
|
|
|
c.completion.height = "33%"
|
|
|
|
c.tabs.show = "multiple"
|
2020-06-04 08:31:58 +02:00
|
|
|
#c.tabs.new_position.related = "last"
|
2020-05-31 10:24:52 +02:00
|
|
|
#c.tabs.tabs_are_windows = True
|
|
|
|
c.content.javascript.enabled = False
|
|
|
|
config.set('content.javascript.enabled', True, '*://*.vulgarisons.info')
|
|
|
|
config.set('content.javascript.enabled', True, '*://mastodon.zaclys.com')
|
2020-06-04 08:31:58 +02:00
|
|
|
config.set('content.javascript.enabled', True, '*://*.melvoridle.com')
|
2020-06-04 09:41:48 +02:00
|
|
|
config.set('content.javascript.enabled', True, '*://*.raiffeisen.ch')
|
2020-06-07 18:07:51 +02:00
|
|
|
config.set('content.javascript.enabled', True, '*://*.cmnet.ch')
|
2021-05-16 10:34:03 +02:00
|
|
|
config.set('content.javascript.enabled', True, '*://*.inubo.ch')
|
2022-01-19 09:10:24 +01:00
|
|
|
config.set('content.javascript.enabled', True, '*://*.localhost/*')
|
|
|
|
|
2021-05-16 10:34:03 +02:00
|
|
|
|
2020-06-04 08:31:58 +02:00
|
|
|
c.url.default_page = 'https://searx.info'
|
2020-05-31 10:24:52 +02:00
|
|
|
c.hints.mode = "number"
|
2020-06-04 08:31:58 +02:00
|
|
|
c.url.searchengines = {
|
2021-07-18 09:02:38 +02:00
|
|
|
'DEFAULT':'https://www.mojeek.com/search?q={}',
|
2020-06-04 08:31:58 +02:00
|
|
|
'ddg':'https://duckduckgo.com/?q={}',
|
2021-12-22 10:08:23 +01:00
|
|
|
# 'yt':'https://youtube.com/results?search_query={}',
|
|
|
|
'yt':'https://invidious.fdn.fr/search?q={}',
|
2020-06-04 08:31:58 +02:00
|
|
|
'wfr':'https://fr.wikipedia.org/w/index.php?search={}',
|
2020-06-12 08:39:15 +02:00
|
|
|
'wen':'https://en.wikipedia.org/w/index.php?search={}',
|
|
|
|
'wyen':'https://en.wiktionary.org/w/index.php?search={}',
|
|
|
|
'wyfr':'https://fr.wiktionary.org/w/index.php?search={}',
|
2020-08-26 07:20:47 +02:00
|
|
|
'imdb':'https://www.imdb.com/find?q={}',
|
2020-11-26 07:47:21 +01:00
|
|
|
'mdn':'https://developer.mozilla.org/en-US/search?q={}',
|
|
|
|
'deb':'https://tracker.debian.org/pkg/{}',
|
2021-05-16 10:34:03 +02:00
|
|
|
'mjk':'https://www.mojeek.com/search?q={}',
|
|
|
|
'php':'https://www.php.net/manual-lookup.php?pattern={}&scope=quickref',
|
2021-07-18 09:02:38 +02:00
|
|
|
'srx':'https://searx.fmac.xyz/?q={}',
|
2021-11-18 18:58:07 +01:00
|
|
|
'12ft':'https://12ft.io/proxy?q={}',
|
2021-12-01 14:23:05 +01:00
|
|
|
'osm':'https://www.openstreetmap.org/search?query={}'
|
2020-06-04 08:31:58 +02:00
|
|
|
}
|
2020-05-31 10:24:52 +02:00
|
|
|
|
|
|
|
#Fonts
|
|
|
|
#c.fonts.statusbar = "17pt monospace"
|
|
|
|
#c.fonts.downloads = "17pt monospace"
|
|
|
|
#c.fonts.hints = "18pt monospace"
|
|
|
|
#c.fonts.keyhint = "17pt monospace"
|
|
|
|
#c.fonts.messages.error = "17pt monospace"
|
|
|
|
#c.fonts.messages.info = "17pt monospace"
|
|
|
|
#c.fonts.messages.warning = "17pt monospace"
|
|
|
|
#c.fonts.completion.entry = "17pt monospace"
|
|
|
|
#c.fonts.completion.category = "17pt monospace"
|
|
|
|
#c.fonts.prompts = "17pt monospace"
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
from qutebrowser.api import message
|
|
|
|
sys.path.append(os.path.join(sys.path[0], 'jblock'))
|
|
|
|
config.source("jblock/jblock/integrations/qutebrowser.py")
|
|
|
|
except ImportError:
|
|
|
|
pass
|