Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[discussion] tying wl-copy --clear to system events #197

Open
ghost opened this issue Aug 24, 2023 · 2 comments
Open

[discussion] tying wl-copy --clear to system events #197

ghost opened this issue Aug 24, 2023 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 24, 2023

I'd greatly benefit from two privacy-related functions (on Wayland):

  1. clear the clipboard when the display shuts off — vital especially for a laptor or other portable Linux device
  2. after any copy event, clear the clipboard after X minutes

I never store any data on the clipboard. As I recall, in at least five years I've never had to recover anything stored there: I at least write a note to /tmp/ or /var/tmp/:

$ cat > /tmp/note.txt

Also tmux and has its own clipboard.

I don't necessarily expect that wl-clipboard can execute the said events on its own. I greatly appreciate any guidance!

@ghost
Copy link
Author

ghost commented Aug 24, 2023

I don't think that --paste-once would be fitting, but I'll consider using the option if no other solutions appear.

-o, --paste-once

Only serve one paste request and then exit. Unless a clipboard manager specifically designed to prevent this is in use, this has the effect
of clearing the clipboard after the first paste, which is useful for copying sensitive data such as passwords. Note that this may break
pasting into some clients, in particular pasting into XWayland windows is known to break when this option is used.

@bugaevc
Copy link
Owner

bugaevc commented Sep 30, 2023

Hello!

clear the clipboard when the display shuts off — vital especially for a laptor or other portable Linux device

This is something that your compositor (or clipboard manager) would implement. In case of an external clipboard manager, the clipboard manager could even be using wl-clipboard (i.e. wl-copy --clear) to actually clear the clipboard.

This would require whichever program that implements it to know when the displays shuts off; wl-clipboard certainly doesn't know that, the compositor likely does.

after any copy event, clear the clipboard after X minutes

This kind of policy, too, could be implemented in an external clipboard manager.

It would also perhaps make some sense to add a --timeout option to wl-copy; this was also requested in #152, but I'm not convinced that it's actually a useful feature to have (in wl-clipboard), and note that this would only affect copies made by wl-clipboard (and then only the ones when you pass --timeout), not copies made by other software. This is why implementing it in a clipboard manager makes more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant