diff options
author | lxf <sng@luxagraf.net> | 2022-04-05 10:18:12 -0400 |
---|---|---|
committer | lxf <sng@luxagraf.net> | 2022-04-05 10:18:12 -0400 |
commit | 45c4fbcc06d5bfd452c2f054930cd7eeb374ff19 (patch) | |
tree | 4969657401e100a60bde941da70b8f1881f82c6d /.config/qutebrowser/config.py | |
parent | e2737d673880d1a4896490f784919bcf08b8af9d (diff) |
wrapped up all the updates into one commit
Diffstat (limited to '.config/qutebrowser/config.py')
-rw-r--r-- | .config/qutebrowser/config.py | 68 |
1 files changed, 26 insertions, 42 deletions
diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 51f4a0b..27be7d2 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -21,14 +21,15 @@ c.tabs.background = True c.tabs.position = "top" c.content.autoplay = False -c.editor.command = ['alacritty', 'nvim', '{}'] +c.editor.command = ['foot', 'nvim', '{}'] c.url.default_page = "about:blank" # searches -c.url.searchengines['DEFAULT'] = 'https://www.startpage.com/rvd/search?query={}&language=auto' +#c.url.searchengines['DEFAULT'] = 'https://www.startpage.com/rvd/search?query={}&language=auto' # tor #c.url.searchengines['DEFAULT'] = 'https://3g2upl4pq6kufc4m.onion/?q={}' -c.url.searchengines['s'] = 'https://duckduckgo.com/?q={}' +c.url.searchengines['DEFAULT'] = 'https://html.duckduckgo.com/html?q={}' +c.url.searchengines['DEFAULT'] = 'https://duckduckgo.com/?q={}' c.url.searchengines['g'] = 'http://www.google.com/search?hl=en&source=hp&ie=ISO-8859-l&q={}' c.url.searchengines['a'] = 'https://wiki.archlinux.org/?search={}' c.url.searchengines['y'] = 'https://www.youtube.com/results?search_query={}' @@ -42,30 +43,12 @@ c.url.searchengines['w'] = 'https://www.google.com/search?q={}+site%3Awired.com' c.content.javascript.enabled = False # JS is okay for some sites: -js_whitelist = [ -"*://localhost/*", -"*://127.0.0.1/*", -"https://live.luxagraf.net/*", -"https://cloud.luxagraf.net/*", -"https://luxagraf.net/*", -"*://github.com/*", -"*://gitlab.com/*", -"*://*.youtube.com/*", -"*://*.tastyworks.com/*", -"*://wandererfinancial.com/*", -"*://*.tradingview.com/*", -"*://translate.google.com/*", -"*://*.schoolsfirstfcu.com/*", -"*://www.ssec.wisc.edu/*", -"*://bumfuzzle.com/*", -"*://pmags.com/*", -"*://*.tastyworks.com/*", -"https://discuss.pixls.us/*", -"https://www.startpage.com/*", -"https://*.schwab.com/*", -"https://*.hyvor.com/*", -"https://ecosophia.dreamwidth.org/*", -] +private_whitelist = os.path.expanduser("~/.config/qutebrowser/whitelists/js") +if os.path.exists(private_whitelist): + with open(private_whitelist) as f: + js_whitelist = filter(lambda l: bool(l), f.read().split("\n")) + + for site in js_whitelist: with config.pattern(site) as p: p.content.javascript.enabled = True @@ -107,6 +90,7 @@ config.unbind('<Ctrl+h>') # Userscripts # call readability on page config.bind (',r', 'spawn --userscript myread.py', mode='normal') +config.bind (',c', 'spawn --userscript camel.py', mode='normal') #download current or hinted video config.bind(',y', 'spawn --userscript youtube-dl') @@ -120,32 +104,32 @@ config.bind(',yv', 'spawn --detach mpv --force-window yes {url}') config.bind (',f', 'open {primary}') config.bind (',F', 'open --tab {primary}') -config.bind (',e', 'open-editor') +config.bind (',e', 'edit-text') # clear cookies config.bind('co', 'spawn bisc', mode='normal') #config.set("colors.webpage.darkmode.enabled", True) # save bookmark to luxagraf -config.bind(',s', "jseval --quiet if(document.getSelection){s=document.getSelection();}else{s='';};document.location='https://live.luxagraf.net/admin/links/link/add?&url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(document.title);") +config.bind(',s', "jseval if(document.getSelection){s=document.getSelection();}else{s='';};document.location='https://live.luxagraf.net/admin/links/link/add/?url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(document.title);") import sys, os #sys.path.append(os.path.join(sys.path[0], "jblock")) #config.source("jblock/jblock/integrations/qutebrowser.py") -config.set( - "content.blocking.hosts.lists", - [ - "https://easylist.to/easylist/fanboy-annoyance.txt", - "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt", - "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances.txt", - "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt", - "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt", - "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt", - "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt", - "https://www.malwaredomainlist.com/hostslist/hosts.txt", - ], -) +#config.set( +# "content.blocking.hosts.lists", +# [ +# "https://easylist.to/easylist/fanboy-annoyance.txt", +# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt", +# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/annoyances.txt", +# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt", +# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/privacy.txt", +# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/resource-abuse.txt", +# "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt", +# "https://www.malwaredomainlist.com/hostslist/hosts.txt", +# ], +#) #config.set( # "content.blocking.whitelist'", |