From c84e52bb573fc9306133be9b70d7cdcc794fb35e Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 7 Jun 2025 15:55:27 -0400 Subject: [PATCH] AutoYADM commit: 2025-06-07 15:55:27 --- .config/kak/autoload/hop.kak | 38 ++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/.config/kak/autoload/hop.kak b/.config/kak/autoload/hop.kak index e74aef0a..24554455 100644 --- a/.config/kak/autoload/hop.kak +++ b/.config/kak/autoload/hop.kak @@ -3,8 +3,40 @@ provide-module hop-kak %~ declare-option range-specs hop_ranges -set-face global hop_label_head %exp{%opt{orange_golden}+Fbugfa} -set-face global hop_label_tail %exp{%opt{orange_golden}+Fbugfa} +set-face global hop_label_head %exp{%opt{background},%opt{orange_golden}+Fbua} +set-face global hop_label_tail %exp{%opt{background},%opt{orange_golden}+Fbua} + +# needed so the cursor face doesn't override what hop sets +# but only temporary because otherwise we want cursor face to +# override others +define-command -hidden hop-set-cursor %{ + set-face window PrimaryCursorNormal "%opt{background},%opt{orange_blaze}+b" + set-face window SecondaryCursorNormal "%opt{background},%opt{orange_muted}" + set-face window PrimaryCursorInsert "%opt{background},%opt{g_3}+b" + set-face window SecondaryCursorInsert "%opt{background},%opt{g_7}" + set-face window PrimaryCursorNormalEol "%opt{background},%opt{orange_smolder}+b" + set-face window SecondaryCursorNormalEol "%opt{background},%opt{golden_muted}" + set-face window PrimaryCursorInsertEol "%opt{background},%opt{g_1}+b" + set-face window SecondaryCursorInsertEol "%opt{background},%opt{g_5}" + set-face window PrimarySelection ",%opt{brown_dark}" + set-face window SecondarySelection ",%opt{brown_darker}" + +} + +define-command -hidden hop-clear-cursor %{ + set-face window PrimaryCursorNormal "%opt{background},%opt{orange_blaze}+gfb" + set-face window SecondaryCursorNormal "%opt{background},%opt{orange_muted}+gf" + set-face window PrimaryCursorInsert "%opt{background},%opt{g_3}+gfb" + set-face window SecondaryCursorInsert "%opt{background},%opt{g_7}+gf" + set-face window PrimaryCursorNormalEol "%opt{background},%opt{orange_smolder}+gfb" + set-face window SecondaryCursorNormalEol "%opt{background},%opt{golden_muted}+gf" + set-face window PrimaryCursorInsertEol "%opt{background},%opt{g_1}+gfb" + set-face window SecondaryCursorInsertEol "%opt{background},%opt{g_5}+gf" + set-face window PrimarySelection ",%opt{brown_dark}+g" + set-face window SecondarySelection ",%opt{brown_darker}+g" + +} + declare-option str hop_kak_keyset 'tnserigmaodhcxplfuwyqz' @@ -12,6 +44,7 @@ declare-option str hop_kak_keyset 'tnserigmaodhcxplfuwyqz' map global normal ':execute-keys gtGbx' define-command hop-kak %{ + hop-set-cursor evaluate-commands -no-hooks -- %sh{ hop-kak --keyset "$kak_opt_hop_kak_keyset" --sels "$kak_selections_desc" } @@ -24,6 +57,7 @@ define-command -override hop-kak-words %{ map window normal ': trigger-user-hook donehop' map window normal , ': trigger-user-hook donehop,' hook -once window User donehop %{ + hop-clear-cursor eval "ui-scrolloff-enable" try %{ ui-wrap-enable } unmap window normal