from pathlib import Path
home = str(Path.home())

c.content.headers.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
c.tabs.padding = {"top": 5, "bottom": 5, "left": 0, "right": 0}
c.fonts.monospace = 'Hack'
c.fonts.tabs = '10pt monospace'
config.source('nord-qutebrowser.py')
foreground = "#ffffff"
background = "#2e3440"
selected = "#4c566a"
c.colors.tabs.bar.bg = background
c.colors.tabs.even.bg = background
c.colors.tabs.even.fg = foreground
c.colors.tabs.odd.bg = background
c.colors.tabs.odd.fg = foreground
c.colors.tabs.selected.even.bg = selected
c.colors.tabs.selected.even.fg = foreground
c.colors.tabs.selected.odd.bg = selected
c.colors.tabs.selected.odd.fg = foreground
c.hints.chars = "asdfkl"
c.hints.border = "1px solid #2e3440"
c.colors.hints.bg = background
c.colors.hints.fg = foreground
c.colors.hints.match.fg = "#bf616a"
c.editor.command = ['st', '-e', 'vi', '-f', '{file}', '-c', 'normal {line}G{column0}l'];

c.url.searchengines = {
  "DEFAULT": "https://duckduckgo.com/?q={}",
  "s": "https://stash.int.openbet.com/plugins/servlet/search?q=\"{}\"",
  "j": "https://jira.openbet.com/issues/?jql=text~\"{}\""
}

proxies = [
  "http://bop.ps.gameop.net:8080",
  "http://custproxy.openbet:8080"
]

def content_persist(p):
  with config.pattern(p) as p:
    p.content.media_capture = True

def exec_userscript(com):
  return 'spawn --userscript {}/.dotfiles/bin/dotctl.sh {}'.format(home, com)

config.bind('<Ctrl-Shift-y>', 'hint links spawn --detach mpv --force-window yes {hint-url}')
config.bind('<Ctrl-Shift-p>', 'config-cycle -p content.proxy system {}'.format(" ".join(proxies)))
config.bind('<Ctrl-Shift-e>', exec_userscript('qute-screenedit'))
config.bind('<Ctrl-Shift-u>', exec_userscript('qute-url'))
config.bind('<Ctrl-Shift-g>', exec_userscript('qute-clone'))
config.bind('<Ctrl-Shift-t>', exec_userscript('qute-tokens'))
config.bind('<Ctrl-i>', 'open-editor', mode='insert')

content_persist('*://meet.google.com/')
content_persist('*://bluejeans.com/')

@@ -1296,16 +1296,121 @@
 080%22%0A%5D%0A%0A
+allowed_content = %5B%0A  %22*://meet.google.com/*%22,%0A  %22*://hangouts.google.com/*%22,%0A  %22*://bluejeans.com/*%22%0A%5D%0A%0A
 def cont
@@ -2092,16 +2092,20 @@
 sert')%0A%0A
+map(
 content_
@@ -2115,67 +2115,23 @@
 sist
-('*://meet.google.com/')%0Acontent_persist('*://bluejeans.com/'
+, allowed_content
 )%0A

fix for media_capture not working