2017-09-18 10:17:48 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
2017-09-26 09:59:27 +02:00
|
|
|
config.backend = "webengine"
|
2017-09-18 10:17:48 +02:00
|
|
|
config.load_autoconfig = False
|
|
|
|
|
|
|
|
c.completion.shrink = True
|
|
|
|
c.confirm_quit = ["downloads"]
|
|
|
|
# c.content.developer_extras = True
|
2018-02-26 11:56:44 +01:00
|
|
|
c.content.javascript.enabled = False
|
2017-09-18 10:17:48 +02:00
|
|
|
c.content.ssl_strict = True
|
2018-03-25 14:00:16 +02:00
|
|
|
c.content.headers.accept_language = "en-US"
|
2017-09-18 10:17:48 +02:00
|
|
|
c.downloads.location.directory = "/data/temporary"
|
|
|
|
c.downloads.location.suggestion = "both"
|
|
|
|
c.downloads.open_dispatcher = "rifle"
|
2017-09-30 01:38:06 +02:00
|
|
|
c.editor.command = ["st", "-e", "vis", "{}"]
|
2017-09-18 10:17:48 +02:00
|
|
|
c.hints.auto_follow = "full-match"
|
|
|
|
c.hints.dictionary = "/usr/share/dict/mnemonic"
|
|
|
|
c.hints.mode = "word"
|
|
|
|
c.new_instance_open_target = "tab-silent"
|
2018-01-04 17:46:18 +01:00
|
|
|
c.session.default_name = "default"
|
2017-09-18 10:17:48 +02:00
|
|
|
c.tabs.background = True
|
|
|
|
c.tabs.last_close = "close"
|
|
|
|
c.tabs.show = "multiple"
|
|
|
|
c.url.default_page = "https://calendar.google.com"
|
|
|
|
c.url.start_pages = ["https://calendar.google.com"]
|
2017-10-02 23:48:56 +02:00
|
|
|
c.aliases = { "wq": "quit --save"
|
|
|
|
, "set": "set -t"
|
|
|
|
, "bind": "bind -t"
|
2017-11-06 17:23:19 +01:00
|
|
|
, "quickmarks": "open qute://bookmarks/"
|
2017-10-02 23:48:56 +02:00
|
|
|
}
|
2017-09-18 10:17:48 +02:00
|
|
|
|
|
|
|
config.bind("<backspace>", "back", mode="normal")
|
|
|
|
config.bind("x", "spawn --detach mpv {url}", mode="normal")
|
|
|
|
config.bind(";x", "hint links spawn --detach mpv {hint-url}", mode="normal")
|
2018-01-04 17:46:18 +01:00
|
|
|
config.bind("si", "jseval --quiet --file simplyread.js", mode="normal")
|
2017-09-18 10:23:35 +02:00
|
|
|
config.bind("z", 'enter-mode insert ;; \
|
|
|
|
jseval --quiet \
|
|
|
|
var inputs = document.getElementsByTagName("input"); \
|
|
|
|
for(var i = 0; i < inputs.length; i++) { \
|
|
|
|
var hidden = false; \
|
|
|
|
for(var j = 0; j < inputs[i].attributes.length; j++) { \
|
|
|
|
hidden = hidden || inputs[i].attributes[j].value.includes("hidden"); \
|
|
|
|
}; \
|
|
|
|
if(!hidden) { \
|
|
|
|
inputs[i].focus(); \
|
|
|
|
break; \
|
|
|
|
} \
|
|
|
|
}', mode="normal")
|
2017-11-06 17:23:19 +01:00
|
|
|
|
|
|
|
# I don't use bookmarks
|
|
|
|
config.unbind('M')
|
|
|
|
config.unbind('wB')
|
|
|
|
config.unbind('gb')
|
|
|
|
config.unbind('gB')
|
|
|
|
config.unbind('Sb')
|
2018-03-12 10:36:09 +01:00
|
|
|
|
|
|
|
# Allowing javascript for...
|
|
|
|
allowed = [ 'https://calendar.google.com/*'
|
|
|
|
, 'https://www.facebook.com/*'
|
|
|
|
, 'https://www.glowing-bear.org/*'
|
|
|
|
, 'https://zeuswpi.slack.com/*'
|
|
|
|
, 'https://github.com/*'
|
2018-03-25 14:00:16 +02:00
|
|
|
, 'https://*.ugent.be/*'
|
2018-03-12 10:36:09 +01:00
|
|
|
, 'https://secure.ogone.com/*' # bancontact
|
|
|
|
, 'https://belgium-3dsecure.wlp-acs.com/*' # bancontact
|
2018-03-25 14:00:16 +02:00
|
|
|
, 'https://*.axabank.be/*'
|
2018-06-26 15:38:39 +02:00
|
|
|
, 'https://*.ing.be/*'
|
|
|
|
, 'https://accounts.google.com/*'
|
|
|
|
, 'https://www.openstreetmap.org/*'
|
|
|
|
, 'https://web.whatsapp.com'
|
2018-03-12 10:36:09 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
for pattern in allowed:
|
|
|
|
config.set('content.javascript.enabled', True, pattern)
|