alacritty: add key hints

This commit is contained in:
lelgenio 2021-06-15 01:41:32 -03:00
parent 5647d423a0
commit baa038a774
3 changed files with 24 additions and 6 deletions

View File

@ -121,6 +121,7 @@ profiles:
variables: variables:
key: key:
layout: colemak layout: colemak
hints: arstwfuyneio
left: n left: n
down: e down: e
up: i up: i
@ -135,6 +136,7 @@ profiles:
variables: variables:
key: key:
layout: qwerty layout: qwerty
hints: asdfwejklçio
left: h left: h
down: j down: j
up: k up: k

View File

@ -65,12 +65,31 @@ colors:
cyan: '{{@@ color.normal.cyan | darker @@}}' cyan: '{{@@ color.normal.cyan | darker @@}}'
white: '{{@@ color.normal.white | darker @@}}' white: '{{@@ color.normal.white | darker @@}}'
draw_bold_text_with_bright_colors: false draw_bold_text_with_bright_colors: false
background_opacity: {{@@ opacity @@}} 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_bindings:
############################################################
- { key: {{@@ key.up | upper @@}}, mode: Vi|~Search, action: Up } - { key: {{@@ key.up | upper @@}}, mode: Vi|~Search, action: Up }
- { key: {{@@ key.down | upper @@}}, mode: Vi|~Search, action: Down } - { key: {{@@ key.down | upper @@}}, mode: Vi|~Search, action: Down }
- { key: {{@@ key.left | upper @@}}, mode: Vi|~Search, action: Left } - { key: {{@@ key.left | upper @@}}, mode: Vi|~Search, action: Left }

View File

@ -47,6 +47,8 @@ config.bind(",M", mpvusc + mpvslowcom)
# Layout specific # Layout specific
########################################################## ##########################################################
c.hints.chars = "{{@@ key.hints @@}}"
key_layout = "{{@@ key_layout @@}}" key_layout = "{{@@ key_layout @@}}"
if key_layout == "colemak": if key_layout == "colemak":
config.bind("t", "hint all") config.bind("t", "hint all")
@ -55,11 +57,6 @@ if key_layout == "colemak":
config.bind("T".upper(), "hint all tab") config.bind("T".upper(), "hint all tab")
config.bind("H".upper(), "set-cmd-text -s :open -t") config.bind("H".upper(), "set-cmd-text -s :open -t")
c.hints.chars = "arstwfuyneio"
elif key_layout == "dvorak":
c.hints.chars = "aoeuidnths"
########################################################## ##########################################################
# Movement # Movement