From c246b02edafe0d5ee2b690c0c1f899e917c88068 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 10 Sep 2024 18:00:35 +0530 Subject: Enable dark mode in qute + add --temp for config changes --- config/qutebrowser/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'config/qutebrowser/config.py') diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index 7db4c10..c65a9a2 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -18,7 +18,7 @@ config.load_autoconfig() # Helper Functions {{{ def toggle_stylesheets(stylesheets): # TODO: Remove the given stylesheets from the list - return 'config-cycle content.user_stylesheets \'' \ + return 'config-cycle --temp content.user_stylesheets \'' \ + json.dumps(c.content.user_stylesheets) \ + '\' \'' \ + json.dumps(c.content.user_stylesheets + stylesheets) \ @@ -157,12 +157,13 @@ c.content.user_stylesheets = [ 'styles/scrollbar.css', 'styles/default.css', 'styles/adblocker.css', - # TODO: Add user styles for lite.duckduckgo.com + # TODO: Add user styles for lite.duckduckgo.com. Had issue with CSP # 'styles/duckduckgo.css' ] # Dark mode -c.aliases['toggle-darkmode'] = toggle_stylesheets(['styles/dark.css']) +# c.aliases['toggle-darkmode'] = toggle_stylesheets(['styles/dark.css']) +c.aliases['toggle-darkmode'] = 'config-cycle --temp colors.webpage.darkmode.enabled' nmap(localleader + 'td', ':toggle-darkmode') # }}} -- cgit v1.3.1