Skip to content

Commit

Permalink
fix(clipboard): remove clippaste additional newline on wayland (ohmyz…
Browse files Browse the repository at this point in the history
…sh#12140)

So clippaste behaves the same as on X11 (xsel, xclip).
  • Loading branch information
Gravemind authored Dec 31, 2023
1 parent 667fdbf commit fa770f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/clipboard.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function detect-clipboard() {
function clippaste() { powershell.exe -noprofile -command Get-Clipboard; }
elif [ -n "${WAYLAND_DISPLAY:-}" ] && (( ${+commands[wl-copy]} )) && (( ${+commands[wl-paste]} )); then
function clipcopy() { cat "${1:-/dev/stdin}" | wl-copy &>/dev/null &|; }
function clippaste() { wl-paste; }
function clippaste() { wl-paste --no-newline; }
elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xsel]} )); then
function clipcopy() { cat "${1:-/dev/stdin}" | xsel --clipboard --input; }
function clippaste() { xsel --clipboard --output; }
Expand Down

0 comments on commit fa770f9

Please sign in to comment.