AutoYADM commit: 2025-06-08 22:04:24
This commit is contained in:
parent
ad5ca55b5a
commit
2e8efd58af
1 changed files with 12 additions and 2 deletions
|
@ -5,13 +5,23 @@ declare-option -docstring %{
|
||||||
Command for copying to system clipboard
|
Command for copying to system clipboard
|
||||||
} str clipboard_copy_cmd 'wl-copy'
|
} 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 %{
|
define-command -docstring %{
|
||||||
Copies selections to system clipboard, splitting each selection onto new lines.
|
Copies selections to system clipboard, splitting each selection onto new lines.
|
||||||
} clip-copy-split %{
|
} clip-copy-split %{
|
||||||
evaluate-commands -save-regs 'a' %{
|
evaluate-commands -save-regs 'a' %{
|
||||||
execute-keys '"ay'
|
execute-keys '"ay'
|
||||||
edit -scratch
|
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
|
delete-buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +32,7 @@ define-command -docstring %{
|
||||||
evaluate-commands -save-regs 'a' %{
|
evaluate-commands -save-regs 'a' %{
|
||||||
execute-keys '"ay'
|
execute-keys '"ay'
|
||||||
edit -scratch
|
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
|
delete-buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue