aboutsummaryrefslogtreecommitdiff
path: root/config/qutebrowser/config.py
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-09-10 18:00:35 +0530
committerAkshay Nair <phenax5@gmail.com>2024-09-10 18:00:35 +0530
commitc246b02edafe0d5ee2b690c0c1f899e917c88068 (patch)
treeb32b3cd8f899e93207b20a02713f12041261ae15 /config/qutebrowser/config.py
parentc4e395ccaaac33b1898d447b09377b8e3fd9cfa3 (diff)
downloadnixos-config-c246b02edafe0d5ee2b690c0c1f899e917c88068.tar.gz
nixos-config-c246b02edafe0d5ee2b690c0c1f899e917c88068.zip
Enable dark mode in qute + add --temp for config changes
Diffstat (limited to '')
-rw-r--r--config/qutebrowser/config.py7
1 files changed, 4 insertions, 3 deletions
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')
# }}}