aboutsummaryrefslogtreecommitdiff
path: root/config/qutebrowser/config.py
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2022-03-03 23:15:35 +0530
committerAkshay Nair <phenax5@gmail.com>2022-03-03 23:15:35 +0530
commit6094a9fa1548a1b6ca510d0707f1d317121f75ea (patch)
tree0610ae5a52e2c55268e410b15622352ff27350c0 /config/qutebrowser/config.py
parente160c24728bad4076f148b0a31de92f88df365d8 (diff)
downloadnixos-config-6094a9fa1548a1b6ca510d0707f1d317121f75ea.tar.gz
nixos-config-6094a9fa1548a1b6ca510d0707f1d317121f75ea.zip
config sync
Diffstat (limited to '')
-rw-r--r--config/qutebrowser/config.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py
index a6d7ef6..ad412f2 100644
--- a/config/qutebrowser/config.py
+++ b/config/qutebrowser/config.py
@@ -16,12 +16,12 @@ localleader = ' '
config.load_autoconfig()
# Helper Functions {{{
-# def toggle_stylesheets(stylesheets):
- # return 'config-cycle content.user_stylesheets \'' \
- # + json.dumps(c.content.user_stylesheets) \
- # + '\' \'' \
- # + json.dumps(c.content.user_stylesheets + stylesheets) \
- # + '\''
+def toggle_stylesheets(stylesheets):
+ return 'config-cycle content.user_stylesheets \'' \
+ + json.dumps(c.content.user_stylesheets) \
+ + '\' \'' \
+ + json.dumps(c.content.user_stylesheets + stylesheets) \
+ + '\''
def bind(key, command, mode): # noqa: E302
"""Bind key to command in mode."""
@@ -72,6 +72,7 @@ c.content.autoplay = True
c.url.open_base_url = True
c.scrolling.bar = 'always'
+c.tabs.mousewheel_switching = False
c.scrolling.smooth = True
c.keyhint.delay = 250
c.input.partial_timeout = 0
@@ -105,7 +106,10 @@ imap('<Ctrl-e>', 'edit-text')
nmap('<Ctrl-e>', 'edit-text')
nmap(localleader+'e', 'edit-url')
-nmap('<Ctrl-p>', 'enter-mode passthrough')
+# Pass through actions
+nmap('<Ctrl-p>', 'mode-enter passthrough')
+pmap('<Ctrl-j>', 'tab-next')
+pmap('<Ctrl-k>', 'tab-prev')
# pmap('<Shift-Escape>', 'enter-mode normal') # Default
nunmap("+")
@@ -144,7 +148,7 @@ c.content.user_stylesheets = [
]
# Dark mode
-# c.aliases['toggle-darkmode'] = toggle_stylesheets(['styles/dark.css'])
+c.aliases['toggle-darkmode'] = toggle_stylesheets(['styles/dark.css'])
nmap(localleader + 'td', ':toggle-darkmode')
# }}}