diff --git a/.config/kak/autoload/email.kak b/.config/kak/autoload/email.kak new file mode 100644 index 00000000..14b4a251 --- /dev/null +++ b/.config/kak/autoload/email.kak @@ -0,0 +1,12 @@ +# hook global BufCreate .*aerc-compose-\d+[.]eml %{ +# set-option buffer filetype mail +# } +declare-option -docstring 'mail formatter' str mail_fmt '/home/fic/dev/utils/mail-utils/format.py' +hook global WinSetOption filetype=mail %{ + set-option window formatcmd %opt{mail_fmt} + hook -group mail-auto-format window BufWritePre .* format + hook -once -always WinSetOption filetype=.* %{ + unset-option window formatcmd + remove-hooks window mail-auto-format + } +}