From baa038a7743f72a17e9437a9b6ab10425aee9455 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Tue, 15 Jun 2021 01:41:32 -0300 Subject: [PATCH] alacritty: add key hints --- config.yaml | 2 ++ dotfiles/alacritty.yml | 21 ++++++++++++++++++++- dotfiles/qutebrowser/keys.py | 7 ++----- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/config.yaml b/config.yaml index 3e842cb..0bfa980 100644 --- a/config.yaml +++ b/config.yaml @@ -121,6 +121,7 @@ profiles: variables: key: layout: colemak + hints: arstwfuyneio left: n down: e up: i @@ -135,6 +136,7 @@ profiles: variables: key: layout: qwerty + hints: asdfwejklçio left: h down: j up: k diff --git a/dotfiles/alacritty.yml b/dotfiles/alacritty.yml index 1fcf781..95b9b0c 100644 --- a/dotfiles/alacritty.yml +++ b/dotfiles/alacritty.yml @@ -65,12 +65,31 @@ colors: cyan: '{{@@ color.normal.cyan | darker @@}}' white: '{{@@ color.normal.white | darker @@}}' - draw_bold_text_with_bright_colors: false background_opacity: {{@@ opacity @@}} + +############################################################ +hints: +############################################################ + alphabet: {{@@ key.hints @@}} + enabled: + - regex: "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + command: xdg-open + post_processing: true + mouse: + enabled: true + mods: None + binding: + key: U + mods: Control|Shift + + +############################################################ key_bindings: +############################################################ - { key: {{@@ key.up | upper @@}}, mode: Vi|~Search, action: Up } - { key: {{@@ key.down | upper @@}}, mode: Vi|~Search, action: Down } - { key: {{@@ key.left | upper @@}}, mode: Vi|~Search, action: Left } diff --git a/dotfiles/qutebrowser/keys.py b/dotfiles/qutebrowser/keys.py index 05fbfdf..823e0c6 100644 --- a/dotfiles/qutebrowser/keys.py +++ b/dotfiles/qutebrowser/keys.py @@ -47,6 +47,8 @@ config.bind(",M", mpvusc + mpvslowcom) # Layout specific ########################################################## +c.hints.chars = "{{@@ key.hints @@}}" + key_layout = "{{@@ key_layout @@}}" if key_layout == "colemak": config.bind("t", "hint all") @@ -55,11 +57,6 @@ if key_layout == "colemak": config.bind("T".upper(), "hint all tab") config.bind("H".upper(), "set-cmd-text -s :open -t") - c.hints.chars = "arstwfuyneio" - -elif key_layout == "dvorak": - c.hints.chars = "aoeuidnths" - ########################################################## # Movement