From 08f0dc08bea1fc820cffb3c5075ffe9fc28a7300 Mon Sep 17 00:00:00 2001 From: Phantop Date: Sun, 3 Jan 2021 16:48:24 -0500 Subject: [PATCH] Qute: enable dark mode, add some better bindings --- .config/qutebrowser/config.py | 18 +++++++++++++----- .config/qutebrowser/greasemonkey/discord.js | 13 +++++++++---- .config/qutebrowser/greasemonkey/hnews.js | 2 +- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 4c48376..eda0602 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -37,15 +37,21 @@ config.set('content.persistent_storage', True, 'https://mega.nz') # BINDINGS # config.bind('', 'close') config.bind('', 'tab-close') -config.bind('c1', "download-open") + +config.bind('c1', 'download-open') +config.bind('gs', 'debug-dump-page ~/Downloads/dump.html') config.bind('sd', "spawn fish -c 'dl; open (ls | rofi -dmenu -b -i || exit 0)'") -c.aliases['mpv'] = "spawn -m -d -v mpv --ytdl-raw-options=write-sub=,write-auto-sub=,embed-subs=,sub-lang=en}" +mpv = 'spawn -m -d -v mpv --ytdl-raw-options=write-sub=,write-auto-sub=,embed-subs=,sub-lang=en' +c.aliases['mpv'] = mpv config.bind('m', 'mpv {url}') -config.bind('M', 'mpv --ytdl-format=bestvideo[vcodec^=avc1]+bestaudio {url}') config.bind(';m', 'hint links run mpv {hint-url}') config.bind(',', 'hint links run mpv {hint-url}') +c.aliases['mpv4'] = mpv + ' --ytdl-format=bestvideo[vcodec^=avc1]+bestaudio' +config.bind('M', 'mpv4 {url}') +config.bind(';M', 'hint links run mpv4 {hint-url}') + config.bind('sq', 'open qr {url}') config.bind('sa', 'open https://archive.is/?run=1&url={url}') config.bind('sw', 'open https://conifer.rhizome.org/record/{url}') @@ -53,8 +59,9 @@ config.bind('se', 'open https://dotepub.com/converter/?url={url}&fmt=epub') c.aliases['remove-sticky'] = 'jseval -q !function(){var e,o=document.querySelectorAll("body *");for(e=0;e', 'spawn -u /usr/bin/env python3 /usr/share/qutebrowser/userscripts/readability') -config.bind('', "spawn kitty rdrview -B qutebrowser {url}") +config.bind('', 'spawn kitty rdrview -B qutebrowser {url}') config.bind('st', 'config-cycle -t content.proxy socks://localhost:9050/ system') config.bind('sc', 'config-cycle -t content.user_stylesheets adapta.css ""') @@ -70,7 +77,8 @@ ccw = cc.webpage ccwd = ccw.darkmode ccw.prefers_color_scheme_dark = True -ccwd.enabled = False +ccwd.enabled = True +ccwd.policy.images = 'never' ccc.category.bg = guicol ccc.scrollbar.bg = guicol diff --git a/.config/qutebrowser/greasemonkey/discord.js b/.config/qutebrowser/greasemonkey/discord.js index fdf0b58..edb2e98 100644 --- a/.config/qutebrowser/greasemonkey/discord.js +++ b/.config/qutebrowser/greasemonkey/discord.js @@ -25,16 +25,13 @@ body { background: url("https://cdn.discordapp.com/attachments/610991459323084801/625107142092783616/moon3.png"); background-size: cover; } -/*[[theme]]*/ -/*remove borders*/ -.header-2o-2hj, +.header-2o-2hj, /*remove borders*/ .searchBar-6Kv8R2, .content-yTz4x3::before { box-shadow: none !important; } -/*misc*/ .container-1D34oG, /*friends list*/ .scrollbar-2rkZSL, /*scrollbar*/ .pad-29zQak, @@ -96,6 +93,14 @@ body { background: rgba(0, 0, 0, .5) !important; } +/* -----UNREAD BADGE DARKMODE FIX----- */ +.item-2hkk8m { + background-color: #ccc; +} + +.unread-2lAfLh { + background-color: #ccc; +} `; } }); diff --git a/.config/qutebrowser/greasemonkey/hnews.js b/.config/qutebrowser/greasemonkey/hnews.js index f34345b..223e0a1 100644 --- a/.config/qutebrowser/greasemonkey/hnews.js +++ b/.config/qutebrowser/greasemonkey/hnews.js @@ -156,7 +156,7 @@ body > center > table[width="85%"] td[bgcolor="#ff6600"] { .comment, .comment > span { font-family: "Open Sans", "Bitstream Vera Sans", Verdana, Geneva, sans-serif !important; - font-size: 15px !important; + font-size: 14px !important; } .comment .c00 {