[plasmashell] [Bug 185311] Option to auto erase content after a certain amount of time

2023-10-23 Thread htpha
https://bugs.kde.org/show_bug.cgi?id=185311

htpha  changed:

   What|Removed |Added

 CC||ht...@gmx.net

--- Comment #5 from htpha  ---
(In reply to Mike from comment #4)
> Currently I manage this with a script that runs from .config/autostart and
> checks org.kde.klipper.klipper.getClipboardContents once per minute. Then,
> when extant data in the clipboard is unchanged for >10 minutes, it runs
> clearClipboardHistory.
> 
> A more perfect (for me) solution would watch for clipboard activity (copy
> AND paste), then clear the contents if there is no activity for x seconds.

Hi!
I might have a solution/workaround for you :^)

I was working on a solution to open mpv on copying youtube urls. I am using
Klippers Action Menu for this to pass all urls matching my pattern to mpv but
this will clutter Klipper with youtube links after a while. Therefore I wanted
these Klipper entries to be removed on triggering my Klipper action. If you
suppress the output of your command or your command doesn't write to stdout and
select "Replace current clipboard" for "Output from command:" this entry will
be removed from Klippers list.

So here is something you can try:

1. Create a new Klipper Action: Configure Clipboard > Actions Configuration >
Add Action
2. Action Properties: Enter your regex pattern and description, ie. "Clear
clipboard history in ... secs after this copy" > Add Command
3. Command Properties: Command: sleep $YOUR_X_SECS && qdbus org.kde.klipper
/klipper org.kde.klipper.klipper.clearClipboardHistory
4. Command Properties: Output from command: Replace current clipboard (if you
want this specific entry to be deleted instead of whole history)
4. ??
5. Profit

With this you have control over when the history should be cleared instead of
relying on a timer. In my case only entries I want to be removed will be
affected and everything else stays. I don't use any delay, only surpressing
mpv's output is enough. You can do something similar for anything you don't
want to stay in the history. Name the Action something like "Delete this in
10secs" and as Command only use sleep.

I also ticked "Show action popup menu:" to "Immediately on selection" or you
can press your shortcut to trigger the Action menu. I believe Meta+Ctrl+R is
the default.

At n...@kde.org: what is the purpose of
org.kde.klipper.klipper.clearClipboardContents? It doesn't seem to do
anything..

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 185311] Option to auto erase content after a certain amount of time

2023-05-16 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=185311

Nate Graham  changed:

   What|Removed |Added

Summary|Option to auto erase|Option to auto erase
   |content |content after a certain
   ||amount of time
 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1
 CC||n...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 185311] Option to auto erase content

2023-03-02 Thread Mike
https://bugs.kde.org/show_bug.cgi?id=185311

--- Comment #4 from Mike  ---
I would like to see this request revisited. 

With the popularity of password managers and the increasing use of pseudorandom
strings as identifiers for things like crypto wallets, the clipboard is
increasingly used to hold highly sensitive information. This has also been a
lure for malicious actors. And while the overwhelming majority, of those
malicious actors target Windows users, I would prefer we not become victims of
our own hubris :)

Currently I manage this with a script that runs from .config/autostart and
checks org.kde.klipper.klipper.getClipboardContents once per minute. Then, when
extant data in the clipboard is unchanged for >10 minutes, it runs
clearClipboardHistory.

A more perfect (for me) solution would watch for clipboard activity (copy AND
paste), then clear the contents if there is no activity for x seconds.

Seeing a check box for "Automatically clear clipboard history when inactive?"
and a box to specify how many seconds after the last copy/paste action to wait
near 'Clipboard history' in the Klipper configuration applet seems to make
perfect sense. :) 

(In reply to Mike from comment #3)
> Created attachment 156935 [details]
> script to clear kde/klipper clipboard after n seconds of last 'copy' action

-- 
You are receiving this mail because:
You are watching all bug changes.

[plasmashell] [Bug 185311] Option to auto erase content

2023-03-02 Thread Mike
https://bugs.kde.org/show_bug.cgi?id=185311

Mike  changed:

   What|Removed |Added

 CC||mike.p...@gmail.com

--- Comment #3 from Mike  ---
Created attachment 156935
  --> https://bugs.kde.org/attachment.cgi?id=156935=edit
script to clear kde/klipper clipboard after n seconds of last 'copy' action

-- 
You are receiving this mail because:
You are watching all bug changes.