AutoYADM commit: 2025-06-08 22:04:24

This commit is contained in:
Daniel Fichtinger 2025-06-08 22:04:24 -04:00
parent ad5ca55b5a
commit 2e8efd58af

View file

@ -5,13 +5,23 @@ declare-option -docstring %{
Command for copying to system clipboard
} str clipboard_copy_cmd 'wl-copy'
define-command -params 0..1 clip-copy %{
evaluate-commands %sh{
if [ ${#} = 1 ] && [ ${1} = split ]; then
echo "clip-copy-split"
else
echo "clip-copy-verbatim"
fi
}
}
define-command -docstring %{
Copies selections to system clipboard, splitting each selection onto new lines.
} clip-copy-split %{
evaluate-commands -save-regs 'a' %{
execute-keys '"ay'
edit -scratch
execute-keys '"a<a-P>a<ret><esc>gjd%<a-|>wl-copy<ret>'
execute-keys '"a<a-P>a<ret><esc>gjd%<a-|>%opt{clipboard_copy_cmd}<ret>'
delete-buffer
}
}
@ -22,7 +32,7 @@ define-command -docstring %{
evaluate-commands -save-regs 'a' %{
execute-keys '"ay'
edit -scratch
execute-keys '"a<a-P>gjd%<a-|>wl-copy<ret>'
execute-keys '"a<a-P>%<a-|>%opt{clipboard_copy_cmd}<ret>'
delete-buffer
}
}