- vim
- mail
- termite
+ - qutebrowser
--- /dev/null
+config.load_autoconfig()
+
+c.auto_save.session = True
+c.content.cookies.accept = 'no-3rdparty'
+c.content.cookies.store = False
+c.content.javascript.enabled = False
+c.content.images = True
+c.editor.command = ['urxvt', '-e', 'vim', '{file}']
+c.tabs.position = 'left'
+c.url.auto_search = 'dns'
+c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}'}
+c.messages.timeout = 5000
+c.tabs.background = True
+
+config.bind(',ej', 'spawn --userscript noscript_enable')
+config.bind(',dj', 'spawn --userscript noscript_disable')
+
+config.bind(',zl', 'spawn --userscript qute-pass --dmenu-invocation dmenu')
+config.bind(',zul', 'spawn --userscript qute-pass --dmenu-invocation dmenu --username-only')
+config.bind(',zpl', 'spawn --userscript qute-pass --dmenu-invocation dmenu --password-only')
+config.bind(',zol', 'spawn --userscript qute-pass --dmenu-invocation dmenu --otp-only')
+
+# Allow JS and cookies on own domain
+config.set('content.javascript.enabled', True, '*.friedersdorff.com')
+
+# Fingerprinting protection
+c.content.headers.accept_language = 'en-US,en;q=0.5'
+c.content.headers.user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'
+c.content.headers.custom = {'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
+
+# wayland
+c.window.hide_decoration = True
--- /dev/null
+#!/bin/sh
+
+SANITIZED_URL="$(echo $QUTE_URL | sed 's/[^/]*\/\/\([^@]*@\)\?\([^/]*\).*/\2\/\*/')"
+
+echo "set -u $SANITIZED_URL content.javascript.enabled false" >> "$QUTE_FIFO"
--- /dev/null
+#!/bin/sh
+
+SANITIZED_URL="$(echo $QUTE_URL | sed 's/[^/]*\/\/\([^@]*@\)\?\([^/]*\).*/\2\/\*/')"
+
+echo "set -u $SANITIZED_URL content.javascript.enabled true" >> "$QUTE_FIFO"
--- /dev/null
+qutebrowser useflags:
+ file.managed:
+ - name: /etc/portage/package.use/qutebrowser-salt
+ - contents:
+ - dev-qt/qtmultimedia widgets
+ - dev-python/PyQt5 multimedia
+ - dev-python/pyyaml libyaml
+ - www-client/qutebrowser scripts
+ - dev-python/PyQtWebEngine widgets
+ - user: root
+ - group: root
+ - mode: 644
+
+install qutebrowser:
+ pkg.installed:
+ - name: www-client/qutebrowser
+ - require:
+ - file: qutebrowser useflags
--- /dev/null
+include:
+ - qutebrowser.{{ grains['os'] | lower}}
+ - local.bin
+
+
+userscripts dir:
+ file.directory:
+ - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 750
+ - makedirs: True
+ - require:
+ - pkg: install qutebrowser
+
+symlink qute-pass:
+ file.symlink:
+ - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts/qute-pass
+ - target: /usr/share/qutebrowser/userscripts/qute-pass
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 750
+ - require:
+ - file: userscripts dir
+
+noscript_enable file:
+ file.managed:
+ - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts/noscript_enable
+ - source: salt://qutebrowser/files/noscript_enable
+ - user: {{ grains['user'] }}
+ - groups: {{ grains['user'] }}
+ - mode: 750
+ - require:
+ - file: userscripts dir
+
+noscript_disable file:
+ file.managed:
+ - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts/noscript_disable
+ - source: salt://qutebrowser/files/noscript_disable
+ - user: {{ grains['user'] }}
+ - groups: {{ grains['user'] }}
+ - mode: 750
+ - require:
+ - file: userscripts dir
+
+qutebrowser wrapper:
+ file.managed:
+ - name: {{ grains['homedir'] }}/.local/bin/qutebrowser
+ - contents:
+ - #!/bin/sh
+ - /usr/bin/qutebrowser --qt-flag disable-reading-from-canvas $@
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 750
+
+qutebrowser config:
+ file.managed:
+ - name: {{ grains['homedir'] }}/.config/qutebrowser/config.py
+ - source: salt://qutebrowser/files/config.py
+ - user: {{ grains['user'] }}
+ - group: {{ grains['user'] }}
+ - mode: 640