From e17341a42f627108bf8fc6fa4f7a56fb416acf87 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Fri, 26 Apr 2024 13:16:10 -0400 Subject: [PATCH] Update pbcopy/paste --- home/kakoune/kakrc | 6 +++--- home/modules/linux/graphical/wayland.nix | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/home/kakoune/kakrc b/home/kakoune/kakrc index 9daeaf8..091a5f4 100644 --- a/home/kakoune/kakrc +++ b/home/kakoune/kakrc @@ -39,9 +39,9 @@ map global goto f -docstring "current grep-jump match" ': grep-jump' hook global RegisterModified '"' %{ nop %sh{ printf "%s" "$kak_main_reg_dquote" | pbcopy >/dev/null 2>/dev/null & }} -map global user P -docstring "Paste before cursor from clipboard" '! pbpaste' -map global user p -docstring "Paste after cursor from clipboard" ' pbpaste' -map global user R -docstring "Replace selection with text from clipboard" '! pbpaste' +map global user P -docstring "Paste before cursor from clipboard" '! pbpaste -n | cat' +map global user p -docstring "Paste after cursor from clipboard" ' pbpaste -n | cat' +map global user R -docstring "Replace selection with text from clipboard" '! pbpaste -n | cat' define-command -params 0 -docstring "Copy line down" copyline %{ execute-keys -draft 'xy'%val{count}'P' } diff --git a/home/modules/linux/graphical/wayland.nix b/home/modules/linux/graphical/wayland.nix index f3a92bf..96ca229 100644 --- a/home/modules/linux/graphical/wayland.nix +++ b/home/modules/linux/graphical/wayland.nix @@ -68,10 +68,10 @@ with lib; # Mimic the clipboard stuff in MacOS (pkgs.writeShellScriptBin "pbcopy" '' - exec ${pkgs.wl-clipboard}/bin/wl-copy + exec ${pkgs.wl-clipboard}/bin/wl-copy "$@" '') (pkgs.writeShellScriptBin "pbpaste" '' - exec ${pkgs.wl-clipboard}/bin/wl-paste -n + exec ${pkgs.wl-clipboard}/bin/wl-paste "$@" '') ];