From bca4ede5b6a801bb5a5d1086d9cc177d5148b425 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sun, 11 May 2025 15:59:08 -0400 Subject: [PATCH] AutoYADM commit: 2025-05-11 15:59:08 --- .config/kak/colors/ashen.kak | 44 ++++++++++++++++++++---------------- .config/kak/kakrc | 3 ++- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.config/kak/colors/ashen.kak b/.config/kak/colors/ashen.kak index a7f43555..d2e6e82f 100644 --- a/.config/kak/colors/ashen.kak +++ b/.config/kak/colors/ashen.kak @@ -61,29 +61,33 @@ set-face global list "%opt{orange_glow}" # We implement a Helix-like cursor changing color. # Off by default; ashen_cursor option must be declared: # declare-option bool ashen_cursor true -try %{ - # check if ashen_dynamic_cursor option is set - nop %opt{ashen_dynamic_cursor} - # Helix-like insert mode cursor - set-face global PrimaryCursorNormal "%opt{background},%opt{orange_blaze}+gfb" - set-face global SecondaryCursorNormal "%opt{background},%opt{orange_muted}+gf" - set-face global PrimaryCursorInsert "%opt{background},%opt{g_3}+gfb" - set-face global SecondaryCursorInsert "%opt{background},%opt{g_7}+gf" - set-face global PrimaryCursor PrimaryCursorNormal - set-face global SecondaryCursor SecondaryCursorNormal +declare-option bool ashen_cursor false - hook global ModeChange (push|pop):.*insert %{ - set-face window PrimaryCursor PrimaryCursorInsert - set-face window SecondaryCursor SecondaryCursorInsert - } +# Helix-like insert mode cursor +set-face global PrimaryCursorNormal "%opt{background},%opt{orange_blaze}+gfb" +set-face global SecondaryCursorNormal "%opt{background},%opt{orange_muted}+gf" +set-face global PrimaryCursorInsert "%opt{background},%opt{g_3}+gfb" +set-face global SecondaryCursorInsert "%opt{background},%opt{g_7}+gf" +set-face global PrimaryCursor PrimaryCursorNormal +set-face global SecondaryCursor SecondaryCursorNormal - hook global ModeChange (push|pop):insert:.* %{ - set-face window PrimaryCursor PrimaryCursorNormal - set-face window SecondaryCursor SecondaryCursorNormal +hook global ModeChange (push|pop):.*insert %{ + evaluate-commands %sh{ + if [ "$kak_opt_ashen_cursor" = "true" ]; then + echo "info $kak_opt_ashen_cursor" + echo "set-face window PrimaryCursor PrimaryCursorInsert" + echo "set-face window SecondaryCursor SecondaryCursorInsert" + fi + } +} + +hook global ModeChange (push|pop):insert:.* %{ + evaluate-commands %sh{ + if [ "$kak_opt_ashen_cursor" = "true" ]; then + echo "set-face window PrimaryCursor PrimaryCursorNormal" + echo "set-face window SecondaryCursor SecondaryCursorNormal" + fi } -} catch %{ - set-face global PrimaryCursor "%opt{background},%opt{orange_blaze}+gfb" - set-face global SecondaryCursor "%opt{background},%opt{orange_muted}+gf" } # Built-in UI diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 956acdf4..f282a456 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -1,6 +1,7 @@ eval %sh{ kak-tree-sitter -dks --init $kak_session } -declare-option bool ashen_dynamic_cursor true +# declare-option bool ashen_dynamic_cursor true colorscheme ashen +# set-option global ashen_cursor true # disable clippy set-option global ui_options terminal_assistant=none