import os c.content.cookies.accept = "no-3rdparty" c.content.cookies.store = True c.downloads.location.directory = '/home/lxf/temp/' c.downloads.location.suggestion = "both" c.downloads.remove_finished = 20 c.spellcheck.languages = ["en-US"] c.auto_save.session = True c.content.pdfjs = True c.session.lazy_restore = True c.tabs.background = True c.tabs.position = "bottom" c.content.autoplay = False c.editor.command = ['urxvt', '-e', 'vim', '{}'] c.url.default_page = "about:blank" # searches c.url.searchengines['DEFAULT'] = 'https://duckduckgo.com/?q={}' c.url.searchengines['s'] = 'https://www.startpage.com/rvd/search?query={}&language=auto' 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={}' c.url.searchengines['ap'] = 'https://www.archlinux.org/packages/?sort=&q={}' c.url.searchengines['aw'] = 'https://www.amazon.com/s?k={}' c.url.searchengines['w'] = 'https://www.google.com/search?q={}+site%3Awired.com' c.url.searchengines['e'] = 'https://duckduckgo.com/?q={}+site%3Ahttps%3A%2F%2Fwww.elliotoracle.com%2Fblog%2F&t=fpas&ia=web' # aliases c.aliases['lux'] = 'open -t https://live.luxagraf.net/admin/' c.aliases['aws'] = 'open -t https://console.aws.amazon.com/' c.aliases['dri'] = 'open -t https://drive.google.com/drive/folders/1Rbbmkz5_Oi9bFzzoNbGtju_RbDMnv2Ul' c.aliases['co'] = 'open -t https://copilot.condenast.io/wrd/dashboard' c.aliases['air'] = 'open -t https://airtable.com/tblV9JHwZkvs5aHRR/viwGZg2OuVNR8BUiO?blocks=hide' c.aliases['gma'] = 'open -t https://mail.google.com/mail/u/0/' # toggle JS config.bind("xjt", "set content.javascript.enabled true") config.bind("xjf", "set content.javascript.enabled false") # block JS out of the box: c.content.javascript.enabled = False js_whitelist = [ "*://localhost/*", "*://127.0.0.1/*", "*://github.com/*", "*://gitlab.com/*", "*://duckduckgo.com/*", "*://*.youtube.com/*", "*://*.luxagraf.net/*" "*://translate.google.com/*", "*://schoolsfirst.com/*", ] 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 # keybinds config.unbind('J', mode='normal') config.unbind('K', mode='normal') config.unbind('') config.bind('J', 'tab-prev', mode='normal') config.bind('K', 'tab-next', mode='normal') # Userscripts # search history/bookmarks in dmenu config.bind (',m', 'spawn --userscript dmenu-open ', mode='normal') config.bind (',o', 'spawn --userscript dmenu-open ', mode='normal') config.bind (',O', 'spawn --userscript dmenu-open --tab', mode='normal') # call readability on page config.bind (',r', 'spawn --userscript readability', mode='normal') #download current or hinted video 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}') config.bind (',F', 'open --tab {primary}') config.bind (',e', 'open-editor') # 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);") import sys, os #sys.path.append(os.path.join(sys.path[0], "jblock")) #config.source("jblock/jblock/integrations/qutebrowser.py") #config.set( # "content.host_blocking.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", [ "duckduckgo.com", "github.com", "stackoverflow.com", "seekingalpha.com", ], ) solarized = { 'base03': '#002b36', 'base02': '#073642', 'base01': '#586e75', 'base00': '#657b83', 'base0': '#839496', 'base1': '#93a1a1', 'base2': '#eee8d5', 'base3': '#fdf6e3', 'yellow': '#b58900', 'orange': '#cb4b16', 'red': '#dc322f', 'magenta': '#d33682', 'violet': '#6c71c4', 'blue': '#268bd2', 'cyan': '#2aa198', 'green': '#859900' } ## This is here so configs done via the GUI are still loaded. ## Remove it to not load settings done via the GUI. config.load_autoconfig() ## Background color of the completion widget category headers. ## Type: QssColor c.colors.completion.category.bg = solarized['base03'] ## Bottom border color of the completion widget category headers. ## Type: QssColor c.colors.completion.category.border.bottom = solarized['base03'] ## Top border color of the completion widget category headers. ## Type: QssColor c.colors.completion.category.border.top = solarized['base03'] ## Foreground color of completion widget category headers. ## Type: QtColor c.colors.completion.category.fg = solarized['base3'] ## Background color of the completion widget for even rows. ## Type: QssColor c.colors.completion.even.bg = solarized['base02'] ## Text color of the completion widget. ## Type: QtColor c.colors.completion.fg = solarized['base1'] ## Background color of the selected completion item. ## Type: QssColor c.colors.completion.item.selected.bg = solarized['violet'] ## Bottom border color of the selected completion item. ## Type: QssColor c.colors.completion.item.selected.border.bottom = solarized['violet'] ## Top border color of the completion widget category headers. ## Type: QssColor c.colors.completion.item.selected.border.top = solarized['violet'] ## Foreground color of the selected completion item. ## Type: QtColor c.colors.completion.item.selected.fg = solarized['base3'] ## Foreground color of the matched text in the completion. ## Type: QssColor c.colors.completion.match.fg = solarized['base2'] ## Background color of the completion widget for odd rows. ## Type: QssColor c.colors.completion.odd.bg = solarized['base02'] ## Color of the scrollbar in completion view ## Type: QssColor c.colors.completion.scrollbar.bg = solarized['base1'] ## Color of the scrollbar handle in completion view. ## Type: QssColor c.colors.completion.scrollbar.fg = solarized['base2'] ## Background color for the download bar. ## Type: QssColor c.colors.downloads.bar.bg = solarized['base03'] ## Background color for downloads with errors. ## Type: QtColor c.colors.downloads.error.bg = solarized['red'] ## Foreground color for downloads with errors. ## Type: QtColor c.colors.downloads.error.fg = solarized['base3'] ## Color gradient start for download backgrounds. ## Type: QtColor # c.colors.downloads.start.bg = '#0000aa' ## Color gradient start for download text. ## Type: QtColor c.colors.downloads.start.fg = solarized['base3'] ## Color gradient stop for download backgrounds. ## Type: QtColor # c.colors.downloads.stop.bg = '#00aa00' ## Color gradient end for download text. ## Type: QtColor # c.colors.downloads.stop.fg = solarized['base3'] ## Color gradient interpolation system for download backgrounds. ## Type: ColorSystem ## Valid values: ## - rgb: Interpolate in the RGB color system. ## - hsv: Interpolate in the HSV color system. ## - hsl: Interpolate in the HSL color system. ## - none: Don't show a gradient. # c.colors.downloads.system.bg = 'rgb' ## Color gradient interpolation system for download text. ## Type: ColorSystem ## Valid values: ## - rgb: Interpolate in the RGB color system. ## - hsv: Interpolate in the HSV color system. ## - hsl: Interpolate in the HSL color system. ## - none: Don't show a gradient. # c.colors.downloads.system.fg = 'rgb' ## Background color for hints. Note that you can use a `rgba(...)` value ## for transparency. ## Type: QssColor c.colors.hints.bg = solarized['violet'] ## Font color for hints. ## Type: QssColor c.colors.hints.fg = solarized['base3'] ## Font color for the matched part of hints. ## Type: QssColor c.colors.hints.match.fg = solarized['base1'] ## Background color of the keyhint widget. ## Type: QssColor # c.colors.keyhint.bg = 'rgba(0, 0, 0, 80%)' ## Text color for the keyhint widget. ## Type: QssColor c.colors.keyhint.fg = solarized['base3'] ## Highlight color for keys to complete the current keychain. ## Type: QssColor c.colors.keyhint.suffix.fg = solarized['yellow'] ## Background color of an error message. ## Type: QssColor c.colors.messages.error.bg = solarized['red'] ## Border color of an error message. ## Type: QssColor c.colors.messages.error.border = solarized['red'] ## Foreground color of an error message. ## Type: QssColor c.colors.messages.error.fg = solarized['base3'] ## Background color of an info message. ## Type: QssColor c.colors.messages.info.bg = solarized['base03'] ## Border color of an info message. ## Type: QssColor c.colors.messages.info.border = solarized['base03'] ## Foreground color an info message. ## Type: QssColor c.colors.messages.info.fg = solarized['base3'] ## Background color of a warning message. ## Type: QssColor c.colors.messages.warning.bg = solarized['orange'] ## Border color of a warning message. ## Type: QssColor c.colors.messages.warning.border = solarized['orange'] ## Foreground color a warning message. ## Type: QssColor c.colors.messages.warning.fg = solarized['base3'] ## Background color for prompts. ## Type: QssColor c.colors.prompts.bg = solarized['base02'] ## Border used around UI elements in prompts. ## Type: String c.colors.prompts.border = '1px solid ' + solarized['base3'] ## Foreground color for prompts. ## Type: QssColor c.colors.prompts.fg = solarized['base3'] ## Background color for the selected item in filename prompts. ## Type: QssColor c.colors.prompts.selected.bg = solarized['base01'] ## Background color of the statusbar in caret mode. ## Type: QssColor c.colors.statusbar.caret.bg = solarized['blue'] ## Foreground color of the statusbar in caret mode. ## Type: QssColor c.colors.statusbar.caret.fg = solarized['base1'] ## Background color of the statusbar in caret mode with a selection. ## Type: QssColor c.colors.statusbar.caret.selection.bg = solarized['violet'] ## Foreground color of the statusbar in caret mode with a selection. ## Type: QssColor c.colors.statusbar.caret.selection.fg = solarized['base1'] ## Background color of the statusbar in command mode. ## Type: QssColor c.colors.statusbar.command.bg = solarized['base03'] ## Foreground color of the statusbar in command mode. ## Type: QssColor c.colors.statusbar.command.fg = solarized['base1'] ## Background color of the statusbar in private browsing + command mode. ## Type: QssColor c.colors.statusbar.command.private.bg = solarized['base01'] ## Foreground color of the statusbar in private browsing + command mode. ## Type: QssColor c.colors.statusbar.command.private.fg = solarized['base3'] ## Background color of the statusbar in insert mode. ## Type: QssColor c.colors.statusbar.insert.bg = solarized['base02'] ## Foreground color of the statusbar in insert mode. ## Type: QssColor c.colors.statusbar.insert.fg = solarized['base1'] ## Background color of the statusbar. ## Type: QssColor c.colors.statusbar.normal.bg = solarized['base03'] ## Foreground color of the statusbar. ## Type: QssColor c.colors.statusbar.normal.fg = solarized['base1'] ## Background color of the statusbar in passthrough mode. ## Type: QssColor c.colors.statusbar.passthrough.bg = solarized['base02'] ## Foreground color of the statusbar in passthrough mode. ## Type: QssColor c.colors.statusbar.passthrough.fg = solarized['base1'] ## Background color of the statusbar in private browsing mode. ## Type: QssColor c.colors.statusbar.private.bg = solarized['base01'] ## Foreground color of the statusbar in private browsing mode. ## Type: QssColor c.colors.statusbar.private.fg = solarized['base3'] ## Background color of the progress bar. ## Type: QssColor c.colors.statusbar.progress.bg = solarized['base1'] ## Foreground color of the URL in the statusbar on error. ## Type: QssColor c.colors.statusbar.url.error.fg = solarized['red'] ## Default foreground color of the URL in the statusbar. ## Type: QssColor c.colors.statusbar.url.fg = solarized['base1'] ## Foreground color of the URL in the statusbar for hovered links. ## Type: QssColor c.colors.statusbar.url.hover.fg = solarized['base2'] ## Foreground color of the URL in the statusbar on successful load ## (http). ## Type: QssColor c.colors.statusbar.url.success.http.fg = solarized['violet'] ## Foreground color of the URL in the statusbar on successful load ## (https). ## Type: QssColor c.colors.statusbar.url.success.https.fg = solarized['base1'] ## Foreground color of the URL in the statusbar when there's a warning. ## Type: QssColor c.colors.statusbar.url.warn.fg = solarized['yellow'] ## Background color of the tab bar. ## Type: QtColor # c.colors.tabs.bar.bg = '#555555' ## Background color of unselected even tabs. ## Type: QtColor c.colors.tabs.even.bg = solarized['base02'] ## Foreground color of unselected even tabs. ## Type: QtColor c.colors.tabs.even.fg = solarized['base1'] ## Color for the tab indicator on errors. ## Type: QtColor c.colors.tabs.indicator.error = solarized['red'] ## Color gradient start for the tab indicator. ## Type: QtColor c.colors.tabs.indicator.start = solarized['violet'] ## Color gradient end for the tab indicator. ## Type: QtColor c.colors.tabs.indicator.stop = solarized['orange'] ## Color gradient interpolation system for the tab indicator. ## Type: ColorSystem ## Valid values: ## - rgb: Interpolate in the RGB color system. ## - hsv: Interpolate in the HSV color system. ## - hsl: Interpolate in the HSL color system. ## - none: Don't show a gradient. # c.colors.tabs.indicator.system = 'rgb' ## Background color of unselected odd tabs. ## Type: QtColor c.colors.tabs.odd.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'] ## 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'] ## Foreground color of selected odd tabs. ## Type: QtColor c.colors.tabs.selected.odd.fg = solarized['base2'] ## Background color for webpages if unset (or empty to use the theme's ## color) ## Type: QtColor # c.colors.webpage.bg = 'white'