Update pbcopy/paste
This commit is contained in:
parent
c7cc8f9516
commit
e17341a42f
|
@ -39,9 +39,9 @@ map global goto f -docstring "current grep-jump match" '<esc>: grep-jump<ret>'
|
||||||
hook global RegisterModified '"' %{ nop %sh{
|
hook global RegisterModified '"' %{ nop %sh{
|
||||||
printf "%s" "$kak_main_reg_dquote" | pbcopy >/dev/null 2>/dev/null &
|
printf "%s" "$kak_main_reg_dquote" | pbcopy >/dev/null 2>/dev/null &
|
||||||
}}
|
}}
|
||||||
map global user P -docstring "Paste before cursor from clipboard" '! pbpaste<ret>'
|
map global user P -docstring "Paste before cursor from clipboard" '! pbpaste -n | cat<ret>'
|
||||||
map global user p -docstring "Paste after cursor from clipboard" '<a-!> pbpaste<ret>'
|
map global user p -docstring "Paste after cursor from clipboard" '<a-!> pbpaste -n | cat<ret>'
|
||||||
map global user R -docstring "Replace selection with text from clipboard" '<a-d>! pbpaste<ret>'
|
map global user R -docstring "Replace selection with text from clipboard" '<a-d>! pbpaste -n | cat<ret>'
|
||||||
define-command -params 0 -docstring "Copy line down" copyline %{
|
define-command -params 0 -docstring "Copy line down" copyline %{
|
||||||
execute-keys -draft 'xy'%val{count}'P'
|
execute-keys -draft 'xy'%val{count}'P'
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,10 @@ with lib;
|
||||||
|
|
||||||
# Mimic the clipboard stuff in MacOS
|
# Mimic the clipboard stuff in MacOS
|
||||||
(pkgs.writeShellScriptBin "pbcopy" ''
|
(pkgs.writeShellScriptBin "pbcopy" ''
|
||||||
exec ${pkgs.wl-clipboard}/bin/wl-copy
|
exec ${pkgs.wl-clipboard}/bin/wl-copy "$@"
|
||||||
'')
|
'')
|
||||||
(pkgs.writeShellScriptBin "pbpaste" ''
|
(pkgs.writeShellScriptBin "pbpaste" ''
|
||||||
exec ${pkgs.wl-clipboard}/bin/wl-paste -n
|
exec ${pkgs.wl-clipboard}/bin/wl-paste "$@"
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue