How to copy text to the clipboard when using Wayland?
up vote
10
down vote
favorite
Is there a Wayland cli utility that copies text to clipboard?
I want to be able to do something like this:
echo "some" > clipboard
Something equivalent to xclip.
clipboard wayland
add a comment |
up vote
10
down vote
favorite
Is there a Wayland cli utility that copies text to clipboard?
I want to be able to do something like this:
echo "some" > clipboard
Something equivalent to xclip.
clipboard wayland
1
I'd be really interested to see the answer to this question too. From my usage of gnome-wayland, it seems to have many restrictions on clipboard access. For example, if you copy something in program A and you close it, the clipboard will automatically get flushed. There is no restriction on copy to clipboard for xclip but it seems pasting will only work if you've copied something while in terminal but not anywhere else. on the other hand, ctrl-v/shift-ctrl-v has no restriction as long as original app is opened...
– thebunnyrules
Feb 22 at 6:22
Discussion regarding wayland + clipboard - wiki.gnome.org/Initiatives/Wayland/PrimarySelection. According to this ticket it sounds like it's been implemented - github.com/swaywm/sway/issues/1012.
– slm
Jun 12 at 2:38
thanks for the links however that did not help me. maybe i missed something
– mh-cbon
Jun 12 at 17:14
add a comment |
up vote
10
down vote
favorite
up vote
10
down vote
favorite
Is there a Wayland cli utility that copies text to clipboard?
I want to be able to do something like this:
echo "some" > clipboard
Something equivalent to xclip.
clipboard wayland
Is there a Wayland cli utility that copies text to clipboard?
I want to be able to do something like this:
echo "some" > clipboard
Something equivalent to xclip.
clipboard wayland
clipboard wayland
edited Jul 13 at 20:35
MMM
11311
11311
asked Mar 16 '17 at 21:43
mh-cbon
868
868
1
I'd be really interested to see the answer to this question too. From my usage of gnome-wayland, it seems to have many restrictions on clipboard access. For example, if you copy something in program A and you close it, the clipboard will automatically get flushed. There is no restriction on copy to clipboard for xclip but it seems pasting will only work if you've copied something while in terminal but not anywhere else. on the other hand, ctrl-v/shift-ctrl-v has no restriction as long as original app is opened...
– thebunnyrules
Feb 22 at 6:22
Discussion regarding wayland + clipboard - wiki.gnome.org/Initiatives/Wayland/PrimarySelection. According to this ticket it sounds like it's been implemented - github.com/swaywm/sway/issues/1012.
– slm
Jun 12 at 2:38
thanks for the links however that did not help me. maybe i missed something
– mh-cbon
Jun 12 at 17:14
add a comment |
1
I'd be really interested to see the answer to this question too. From my usage of gnome-wayland, it seems to have many restrictions on clipboard access. For example, if you copy something in program A and you close it, the clipboard will automatically get flushed. There is no restriction on copy to clipboard for xclip but it seems pasting will only work if you've copied something while in terminal but not anywhere else. on the other hand, ctrl-v/shift-ctrl-v has no restriction as long as original app is opened...
– thebunnyrules
Feb 22 at 6:22
Discussion regarding wayland + clipboard - wiki.gnome.org/Initiatives/Wayland/PrimarySelection. According to this ticket it sounds like it's been implemented - github.com/swaywm/sway/issues/1012.
– slm
Jun 12 at 2:38
thanks for the links however that did not help me. maybe i missed something
– mh-cbon
Jun 12 at 17:14
1
1
I'd be really interested to see the answer to this question too. From my usage of gnome-wayland, it seems to have many restrictions on clipboard access. For example, if you copy something in program A and you close it, the clipboard will automatically get flushed. There is no restriction on copy to clipboard for xclip but it seems pasting will only work if you've copied something while in terminal but not anywhere else. on the other hand, ctrl-v/shift-ctrl-v has no restriction as long as original app is opened...
– thebunnyrules
Feb 22 at 6:22
I'd be really interested to see the answer to this question too. From my usage of gnome-wayland, it seems to have many restrictions on clipboard access. For example, if you copy something in program A and you close it, the clipboard will automatically get flushed. There is no restriction on copy to clipboard for xclip but it seems pasting will only work if you've copied something while in terminal but not anywhere else. on the other hand, ctrl-v/shift-ctrl-v has no restriction as long as original app is opened...
– thebunnyrules
Feb 22 at 6:22
Discussion regarding wayland + clipboard - wiki.gnome.org/Initiatives/Wayland/PrimarySelection. According to this ticket it sounds like it's been implemented - github.com/swaywm/sway/issues/1012.
– slm
Jun 12 at 2:38
Discussion regarding wayland + clipboard - wiki.gnome.org/Initiatives/Wayland/PrimarySelection. According to this ticket it sounds like it's been implemented - github.com/swaywm/sway/issues/1012.
– slm
Jun 12 at 2:38
thanks for the links however that did not help me. maybe i missed something
– mh-cbon
Jun 12 at 17:14
thanks for the links however that did not help me. maybe i missed something
– mh-cbon
Jun 12 at 17:14
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
bugaevc's wl-clipboard are copy/paste utilities for Wayland:
This project implements two little Wayland clipboard utilities,
wl-copy and wl-paste, that let you easily copy data between the
clipboard and Unix pipes, sockets, files and so on.
Usage is as simple as:
# copy a simple text message
$ wl-copy Hello world!
# copy the list of files in Downloads
$ ls ~/Downloads | wl-copy
# copy an image file
$ wl-copy < ~/Pictures/photo.png
# paste to a file
$ wl-paste > clipboard.txt
# grep each pasted word in file source.c
$ for word in $(wl-paste); do grep $word source.c; done
# copy the previous command
$ wl-copy "!!"
# replace the current selection with the list of types it's offered in
$ wl-paste --list-types | wl-copy
Although wl-copy and wl-paste are particularly optimized for plain
text and other textual content formats, they fully support content of
arbitrary MIME types. wl-copy automatically infers the type of the
copied content by running xdg-mime(1) on it. wl-paste tries its best
to pick a type to paste based on the list of offered MIME types and
the extension of the file it's pasting into. If you're not satisfied
with the type they pick or don't want to rely on this implicit type
inference, you can explicitly specify the type to use with the --type
option.
add a comment |
up vote
2
down vote
wclip is a clipboard tool for Wayland that is very similar to xclip
.
Usage is as follows:
$ wclip i < my_text_file
$ wclip o
contents of my text file
$
Disclaimer: I am the author.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
bugaevc's wl-clipboard are copy/paste utilities for Wayland:
This project implements two little Wayland clipboard utilities,
wl-copy and wl-paste, that let you easily copy data between the
clipboard and Unix pipes, sockets, files and so on.
Usage is as simple as:
# copy a simple text message
$ wl-copy Hello world!
# copy the list of files in Downloads
$ ls ~/Downloads | wl-copy
# copy an image file
$ wl-copy < ~/Pictures/photo.png
# paste to a file
$ wl-paste > clipboard.txt
# grep each pasted word in file source.c
$ for word in $(wl-paste); do grep $word source.c; done
# copy the previous command
$ wl-copy "!!"
# replace the current selection with the list of types it's offered in
$ wl-paste --list-types | wl-copy
Although wl-copy and wl-paste are particularly optimized for plain
text and other textual content formats, they fully support content of
arbitrary MIME types. wl-copy automatically infers the type of the
copied content by running xdg-mime(1) on it. wl-paste tries its best
to pick a type to paste based on the list of offered MIME types and
the extension of the file it's pasting into. If you're not satisfied
with the type they pick or don't want to rely on this implicit type
inference, you can explicitly specify the type to use with the --type
option.
add a comment |
up vote
3
down vote
accepted
bugaevc's wl-clipboard are copy/paste utilities for Wayland:
This project implements two little Wayland clipboard utilities,
wl-copy and wl-paste, that let you easily copy data between the
clipboard and Unix pipes, sockets, files and so on.
Usage is as simple as:
# copy a simple text message
$ wl-copy Hello world!
# copy the list of files in Downloads
$ ls ~/Downloads | wl-copy
# copy an image file
$ wl-copy < ~/Pictures/photo.png
# paste to a file
$ wl-paste > clipboard.txt
# grep each pasted word in file source.c
$ for word in $(wl-paste); do grep $word source.c; done
# copy the previous command
$ wl-copy "!!"
# replace the current selection with the list of types it's offered in
$ wl-paste --list-types | wl-copy
Although wl-copy and wl-paste are particularly optimized for plain
text and other textual content formats, they fully support content of
arbitrary MIME types. wl-copy automatically infers the type of the
copied content by running xdg-mime(1) on it. wl-paste tries its best
to pick a type to paste based on the list of offered MIME types and
the extension of the file it's pasting into. If you're not satisfied
with the type they pick or don't want to rely on this implicit type
inference, you can explicitly specify the type to use with the --type
option.
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
bugaevc's wl-clipboard are copy/paste utilities for Wayland:
This project implements two little Wayland clipboard utilities,
wl-copy and wl-paste, that let you easily copy data between the
clipboard and Unix pipes, sockets, files and so on.
Usage is as simple as:
# copy a simple text message
$ wl-copy Hello world!
# copy the list of files in Downloads
$ ls ~/Downloads | wl-copy
# copy an image file
$ wl-copy < ~/Pictures/photo.png
# paste to a file
$ wl-paste > clipboard.txt
# grep each pasted word in file source.c
$ for word in $(wl-paste); do grep $word source.c; done
# copy the previous command
$ wl-copy "!!"
# replace the current selection with the list of types it's offered in
$ wl-paste --list-types | wl-copy
Although wl-copy and wl-paste are particularly optimized for plain
text and other textual content formats, they fully support content of
arbitrary MIME types. wl-copy automatically infers the type of the
copied content by running xdg-mime(1) on it. wl-paste tries its best
to pick a type to paste based on the list of offered MIME types and
the extension of the file it's pasting into. If you're not satisfied
with the type they pick or don't want to rely on this implicit type
inference, you can explicitly specify the type to use with the --type
option.
bugaevc's wl-clipboard are copy/paste utilities for Wayland:
This project implements two little Wayland clipboard utilities,
wl-copy and wl-paste, that let you easily copy data between the
clipboard and Unix pipes, sockets, files and so on.
Usage is as simple as:
# copy a simple text message
$ wl-copy Hello world!
# copy the list of files in Downloads
$ ls ~/Downloads | wl-copy
# copy an image file
$ wl-copy < ~/Pictures/photo.png
# paste to a file
$ wl-paste > clipboard.txt
# grep each pasted word in file source.c
$ for word in $(wl-paste); do grep $word source.c; done
# copy the previous command
$ wl-copy "!!"
# replace the current selection with the list of types it's offered in
$ wl-paste --list-types | wl-copy
Although wl-copy and wl-paste are particularly optimized for plain
text and other textual content formats, they fully support content of
arbitrary MIME types. wl-copy automatically infers the type of the
copied content by running xdg-mime(1) on it. wl-paste tries its best
to pick a type to paste based on the list of offered MIME types and
the extension of the file it's pasting into. If you're not satisfied
with the type they pick or don't want to rely on this implicit type
inference, you can explicitly specify the type to use with the --type
option.
edited Nov 22 at 21:57
answered Nov 22 at 11:56
adabru
463
463
add a comment |
add a comment |
up vote
2
down vote
wclip is a clipboard tool for Wayland that is very similar to xclip
.
Usage is as follows:
$ wclip i < my_text_file
$ wclip o
contents of my text file
$
Disclaimer: I am the author.
add a comment |
up vote
2
down vote
wclip is a clipboard tool for Wayland that is very similar to xclip
.
Usage is as follows:
$ wclip i < my_text_file
$ wclip o
contents of my text file
$
Disclaimer: I am the author.
add a comment |
up vote
2
down vote
up vote
2
down vote
wclip is a clipboard tool for Wayland that is very similar to xclip
.
Usage is as follows:
$ wclip i < my_text_file
$ wclip o
contents of my text file
$
Disclaimer: I am the author.
wclip is a clipboard tool for Wayland that is very similar to xclip
.
Usage is as follows:
$ wclip i < my_text_file
$ wclip o
contents of my text file
$
Disclaimer: I am the author.
answered Sep 23 at 19:45
J. Wang
212
212
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1189467%2fhow-to-copy-text-to-the-clipboard-when-using-wayland%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I'd be really interested to see the answer to this question too. From my usage of gnome-wayland, it seems to have many restrictions on clipboard access. For example, if you copy something in program A and you close it, the clipboard will automatically get flushed. There is no restriction on copy to clipboard for xclip but it seems pasting will only work if you've copied something while in terminal but not anywhere else. on the other hand, ctrl-v/shift-ctrl-v has no restriction as long as original app is opened...
– thebunnyrules
Feb 22 at 6:22
Discussion regarding wayland + clipboard - wiki.gnome.org/Initiatives/Wayland/PrimarySelection. According to this ticket it sounds like it's been implemented - github.com/swaywm/sway/issues/1012.
– slm
Jun 12 at 2:38
thanks for the links however that did not help me. maybe i missed something
– mh-cbon
Jun 12 at 17:14