AutoYADM commit: 2025-06-06 16:10:06

This commit is contained in:
Daniel Fichtinger 2025-06-06 16:10:06 -04:00
parent 9c2bf2b566
commit 53b8fc9ac6
3 changed files with 24 additions and 24 deletions

View file

@ -21,7 +21,7 @@ hook global WinSetOption filetype=kak %{
hook global WinSetOption filetype=typst %{ hook global WinSetOption filetype=typst %{
set-option buffer formatcmd "typstyle --wrap-text" set-option buffer formatcmd "typstyle --wrap-text"
hook -group typst-auto-format window BufWritePre .* format hook -group typst-auto-format window BufWritePre .* format
hook -once -always WinSetOption filetype=.* %{ hook -once -always window WinSetOption filetype=.* %{
unset-option window formatcmd unset-option window formatcmd
remove-hooks window typst-auto-format remove-hooks window typst-auto-format
} }
@ -34,6 +34,7 @@ hook global WinSetOption filetype=typst %{
} > /dev/null 2>&1 < /dev/null & } > /dev/null 2>&1 < /dev/null &
} }
} }
nop %sh{ notify-send "4" }
} }
hook global WinSetOption filetype=fish %{ hook global WinSetOption filetype=fish %{

View file

@ -21,11 +21,13 @@ hook global WinSetOption filetype=typst %(
hook window InsertChar \n -group typst-indent typst-indent-on-new-line hook window InsertChar \n -group typst-indent typst-indent-on-new-line
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window typst-.+ } hook -once -always window WinSetOption filetype=.* %{ remove-hooks window typst-.+ }
nop %sh{ notify-send "2" }
) )
hook -group typst-highlight global WinSetOption filetype=typst %{ hook -group typst-highlight global WinSetOption filetype=typst %{
add-highlighter window/typst ref typst add-highlighter window/typst ref typst
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/typst } hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/typst }
nop %sh{ notify-send "3" }
} }
provide-module typst %~ provide-module typst %~

View file

@ -95,17 +95,17 @@ map -docstring 'Extend to file end' global user n "gj<a-l>l"
# Zathura pdf preview only for Typst files # Zathura pdf preview only for Typst files
hook global WinSetOption filetype=typst %{ # hook global WinSetOption filetype=typst %{
define-command -docstring %{ # define-command -docstring %{
Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file # Spawns a Zathura pdf preview and Typst watcher for the currently open Typst file
} typst %{ # } typst %{
nop %sh{ # nop %sh{
{ # {
"$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid" # "$kak_config/scripts/kak-typ-zathura.fish" -k -w "$kak_buffile" "$kak_client_pid"
} > /dev/null 2>&1 < /dev/null & # } > /dev/null 2>&1 < /dev/null &
} # }
} # }
} # }
define-command -docstring "Create a scratch buffer" scratch %{ define-command -docstring "Create a scratch buffer" scratch %{
edit -scratch edit -scratch
@ -197,6 +197,3 @@ map -docstring 'popup shell' global user . ': popup-shell<ret>'
# } # }
# } # }
hook -once global BufCreate ^(?!(\*scratch\*|\*debug\*)) %{
delete-buffer *scratch*
}