1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-22 23:02:46 +00:00

qute: separate out aliases, ao3 and shutup

This commit is contained in:
Phantop 2022-03-11 11:53:26 -05:00
parent 8bb922424e
commit 8dc4a8e7ff
3 changed files with 11 additions and 7 deletions

8
qutebrowser/aliases.py Normal file
View file

@ -0,0 +1,8 @@
a=c.aliases
a['re'] = 'restart'
a['mpv'] = 'spawn -mdv mpv --ytdl-raw-options=sub-lang=en'
a['css-reload'] = 'set content.user_stylesheets user.css'
a['scss-reload'] = 'spawn -u /bin/sh -c "sass $QUTE_CONFIG_DIR/user.{s,}css"'
a['remove-sticky'] = 'jseval -q document.querySelectorAll("*").forEach(e=>{["sticky","fixed"].includes(getComputedStyle(e).position)&&e.parentNode.removeChild(e)})'
a['toggle-dark'] = 'reload;;jseval -q const meta=document.createElement("meta");meta.name="color-scheme";document.head.appendChild(meta).content="dark";;stop'
a['shutup'] = 'jseval -q document.head.appendChild(document.createElement("style")).innerHTML="@import url(https://rickyromero.com/shutup/updates/shutup.css)"'

View file

@ -3,6 +3,8 @@ bind = {
'<Ctrl-q>': 'close',
'<Ctrl-r>': 'spawn -u readability',
'<Ctrl-w>': 'tab-close',
'<Ctrl-Shift-a>': 'jseval -q c=document.getElementsByTagName(\'option\'); window.location.href = c[c.length-1].value',
'<Ctrl-Shift-x>': 'jseval -q window.location.href=document.getElementsByTagName(\'option\')[0].value',
'<Alt+f>' : 'config-cycle hints.chars qwerasdf asdfghjkl',
',': 'hint links run mpv {hint-url}',
';a': 'hint links run ' + kitdl + ' dl {hint-url}"',

View file

@ -1,5 +1,6 @@
config.load_autoconfig(False)
config.source('adblock.py')
config.source('aliases.py')
config.source('color.py')
config.source('bindings.py')
config.source('javascript.py')
@ -22,13 +23,6 @@ c.colors.webpage.darkmode.enabled = True
c.colors.webpage.preferred_color_scheme = 'dark'
c.colors.webpage.darkmode.policy.images = 'never'
c.aliases['re'] = 'restart'
c.aliases['mpv'] = 'spawn -mdv mpv --ytdl-raw-options=sub-lang=en'
c.aliases['css-reload'] = 'set content.user_stylesheets user.css'
c.aliases['scss-reload'] = 'spawn -u /bin/sh -c "sass $QUTE_CONFIG_DIR/user.{s,}css"'
c.aliases['remove-sticky'] = 'jseval -q document.querySelectorAll("*").forEach(e=>{["sticky","fixed"].includes(getComputedStyle(e).position)&&e.parentNode.removeChild(e)})'
c.aliases['toggle-dark'] = 'reload;;jseval -q const meta=document.createElement("meta");meta.name="color-scheme";document.head.appendChild(meta).content="dark";;stop'
config.set('content.notifications.enabled', True, 'https://mail.tutanota.com')
config.set('content.register_protocol_handler', True, 'https://mail.tutanota.com')