AutoYADM commit: 2025-05-31 16:48:17

This commit is contained in:
Daniel Fichtinger 2025-05-31 16:48:17 -04:00
parent 1e678e6204
commit f8ad692156
3 changed files with 12 additions and 3 deletions

View file

@ -593,7 +593,6 @@ reverse-thread-order=true
# Default: less -Rc
# pager=hx
# pager=less -Rc -k ~/.config/lesskey
; pager=kak -ro -e 'def -hidden ismailreader nop; set buffer filetype mail'
pager=kak -e 'set buffer filetype mail'
#

View file

@ -1,5 +1,9 @@
provide-module byline %{
try %{ define-command -hidden true nop }
try %{ define-command -hidden false fail }
declare-option -hidden bool base_readonly false
# Mappings
map global "normal" "x" ": byline-drag-down<ret>"

View file

@ -73,15 +73,21 @@ hook global WinSetOption filetype=kdl %{
}
hook global WinSetOption filetype=mail %~
nop %sh{ notify-send 'runs' }
evaluate-commands %sh{
# stdin, we assume it's a pager
if [ "$kak_bufname" = "*stdin*" ]; then
echo 'define-command -hidden ismailreader nop'
fi
}
try %{
ismailreader
nop %sh{ notify-send 'is mail reader' }
set buffer readonly true
try %{
# remove these highlighters so everything displays properly
remove-highlighter window/number-lines
remove-highlighter window/show-whitespaces
ui-wrap-disable
ui-scrolloff-disable
}
} catch %{
set-option window formatcmd '/home/fic/dev/utils/mail-utils/format.py'