sentriz / cliphist

wayland clipboard manager with support for multimedia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Wipe timer

Animaly0 opened this issue · comments

Hi, were wondering if there were a time metadata associated to each clipboard entry.

I’m not a fan of having my clipboard populated with possible passwords and all.
Currently, I have a timer who will wipe my clipboard every 10 min, but that means that sometimes, the database will be wiped just after I have copied an item, forcing me to copy the item when the paste didn’t work.

Is there a way to set up a wipe for only 10min old entries and plus ? This would mean that each entry will always be available in the database for a set amount of time.

Thank you :D

sometimes, the database will be wiped just after I have copied an item, forcing me to copy the item when the paste didn’t work

not sure i get this. presumably, you run a cliphist wipe every 10 min, but that shouldn't affect what you have in your clipboard. can you elaborate on this "forcing me to copy the item when the paste didn’t work" issue? thanks

I think I confused the clipboard with the database of cliphist (cliphist list).
This confusion may comes from the fact that when I check the database with cliphist list | dmenu | cliphist decode | wl-copy, it clears my clipboard. So everytime I checked the database, it cleared my clipboard and if the database was cleared just recently, I wouldn’t know what was copied recently.

So what I meant was, is there a way to keep in the database only the most recent items without having to wipe them all at once ?

ah i see. what if you replace your cliphist list | dmenu | cliphist decode | wl-copy script with once such as this

which will not wipe your clipboard after checking an empty database (specifically, when dmenu did not return a selection). then when you wipe your history, and check the db, the last selection will not be wiped

yeah, that’s works ! thanks for the script. That might aleviate the problem I had !

cool!