diff options
Diffstat (limited to '.config/qutebrowser/config.py')
-rw-r--r-- | .config/qutebrowser/config.py | 60 |
1 files changed, 38 insertions, 22 deletions
diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 09965e0..51f4a0b 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -21,7 +21,7 @@ c.tabs.background = True c.tabs.position = "top" c.content.autoplay = False -c.editor.command = ['foot', 'nvim', '{}'] +c.editor.command = ['alacritty', 'nvim', '{}'] c.url.default_page = "about:blank" # searches @@ -34,33 +34,43 @@ c.url.searchengines['a'] = 'https://wiki.archlinux.org/?search={}' c.url.searchengines['y'] = 'https://www.youtube.com/results?search_query={}' c.url.searchengines['ap'] = 'https://www.archlinux.org/packages/?sort=&q={}' c.url.searchengines['w'] = 'https://www.google.com/search?q={}+site%3Awired.com' -c.url.searchengines['t'] = 'https://lite.duckduckgo.com/lite/?q={}%20site%3Ahttps%3A%2F%2Fwww.elliotoracle.com%2Fblog%2F&t=fpas&ia=web' + #tor #c.content.proxy = 'socks://localhost:9050/' # block JS out of the box: c.content.javascript.enabled = False +# JS is okay for some sites: js_whitelist = [ - "*://localhost/*", - "*://127.0.0.1/*", - "*://github.com/*", - "*://gitlab.com/*", - "*://*.youtube.com/*", - "*://*.luxagraf.net/*" - "*://translate.google.com/*", - "*://schoolsfirst.com/*", +"*://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/private-whitelist") -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 -# ================== Youtube Add Blocking ======================= {{{ +# ================== Youtube Ad Blocking ======================= {{{ def filter_yt(info: interceptor.Request): """Block the given request if necessary.""" url = info.request_url @@ -82,6 +92,11 @@ config.unbind('K', mode='normal') config.bind('J', 'tab-prev', mode='normal') config.bind('K', 'tab-next', mode='normal') +# pinned tab nav +config.bind('<Ctrl+1>', 'tab-select 1', mode='normal') +config.bind('<Ctrl+2>', 'tab-select 2', mode='normal') +config.bind('<Ctrl+3>', 'tab-select 3', mode='normal') +config.bind('<Ctrl+4>', 'tab-select 4', mode='normal') # get rid of things I always hit accidentally config.unbind('<Ctrl+v>') # however passthru mode is nice on some sites @@ -94,13 +109,12 @@ config.unbind('<Ctrl+h>') config.bind (',r', 'spawn --userscript myread.py', mode='normal') #download current or hinted video -config.bind(';y', 'spawn --userscript youtube-dl') +config.bind(',y', 'spawn --userscript youtube-dl') config.bind(';yh', 'hint links --userscript youtube-dl') # watch current or hinted video config.bind(',yl', 'hint links spawn --detach mpv --force-window yes {hint-url}') config.bind(',yv', 'spawn --detach mpv --force-window yes {url}') -config.bind(',ys', 'spawn --userscript youtube-dl') # open selected text in tab config.bind (',f', 'open {primary}') @@ -471,22 +485,24 @@ c.colors.tabs.indicator.stop = solarized['orange'] ## Background color of unselected odd tabs. ## Type: QtColor c.colors.tabs.odd.bg = solarized['base03'] - +c.colors.tabs.pinned.odd.bg = solarized['base03'] +c.colors.tabs.pinned.even.bg = solarized['base03'] ## Foreground color of unselected odd tabs. ## Type: QtColor c.colors.tabs.odd.fg = solarized['base1'] ## Background color of selected even tabs. ## Type: QtColor -c.colors.tabs.selected.even.bg = solarized['violet'] - +c.colors.tabs.selected.even.bg = solarized['yellow'] +c.colors.tabs.pinned.selected.even.bg = solarized['yellow'] +c.colors.tabs.pinned.selected.odd.bg = solarized['yellow'] ## Foreground color of selected even tabs. ## Type: QtColor c.colors.tabs.selected.even.fg = solarized['base2'] ## Background color of selected odd tabs. ## Type: QtColor -c.colors.tabs.selected.odd.bg = solarized['violet'] +c.colors.tabs.selected.odd.bg = solarized['yellow'] ## Foreground color of selected odd tabs. ## Type: QtColor |