diff --git a/CHANGELOG.md b/CHANGELOG.md index 178add350..708f924fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Added completions for: - nothing yet... - Lots of improvements to completions. +- fish_clipboard_* now supports wayland by means of [wl-clipboard](https://github.com/bugaevc/wl-clipboard). --- diff --git a/share/functions/fish_clipboard_copy.fish b/share/functions/fish_clipboard_copy.fish index 85c64e3a2..0054198aa 100644 --- a/share/functions/fish_clipboard_copy.fish +++ b/share/functions/fish_clipboard_copy.fish @@ -10,5 +10,7 @@ function fish_clipboard_copy printf '%s\n' $cmdline | xsel --clipboard 2>/dev/null else if type -q xclip printf '%s\n' $cmdline | xclip -selection clipboard 2>/dev/null + else if type -q wl-copy + printf '%s\n' $cmdline | wl-copy end end diff --git a/share/functions/fish_clipboard_paste.fish b/share/functions/fish_clipboard_paste.fish index 942724160..e56ff6b16 100644 --- a/share/functions/fish_clipboard_paste.fish +++ b/share/functions/fish_clipboard_paste.fish @@ -13,6 +13,8 @@ function fish_clipboard_paste if not set data (xclip -selection clipboard -o 2>/dev/null) return 1 end + else if type -q wl-paste + set data (wl-paste) end # Also split on \r to turn it into a newline, # otherwise the output looks really confusing.