Duliwi wrote: Mon Dec 16, 2024 4:18 am
What I want, are the following features:
1. Clipboard should not be deleted after I close a flatpak programme
2. Passwords, copied from passwordmanager "Enpass" should not be hold in the clipboard history.
– Clipman supports neither feature 1 nor feature 2
– diodon supports feature 1 and together with "activity-log-manager" also feature 2
– copyQ supports not feature 1, but it supports feature 2
So the only clipboard, that suits my demands is didion. But only if I can install "activity-log-manager"
OK. I have found a way to get both with copyQ.
1. Click on copyQ icon in panel
2. press F6
3. press "add" button (Hinzufügen)
4. new command
5. under command type in this:
Code: Select all
const timeoutMilliseconds = 500;
function reset(key, getFn, setFn) {
if (hasData()) {
settings(key, [data(mimeText), str(Date.now())]);
return false;
}
const last = settings(key);
if (!last) {
return false;
}
afterMilliseconds(timeoutMilliseconds, function() {
if (!str(getFn()) && last[1] == settings(key)[1]) {
serverLog('Reset from ' + key);
setFn(mimeText, last[0], mimeHidden, 1);
}
});
return true;
}
function resetClipboard() {
return reset('lastClipboard', clipboard, copy);
}
function resetSelection() {
return reset('lastSelection', selection, copySelection);
}
let onClipboardChanged_ = onClipboardChanged;
onClipboardChanged = function() {
onClipboardChanged_();
const wait = isClipboard() ? resetClipboard() : resetSelection();
if (wait) {
sleep(timeoutMilliseconds + 1000);
}
}
k20241223-223724.png
6. apply
You do not have the required permissions to view the files attached to this post.