Closed alotia closed 3 months ago
@alotia Thank you for your suggestion, but unfortunately, I don't have access to the OS and can't detect which app is used for the user's copy action. This would require a deeper integration into the users' OS (on Mac or Windows), and I don't want to do that. Privacy first.
You have two options with PasteBar. You can mask the password in the clipboard history.
Next time you copy your password, it will be masked.
Or add your password or password prefix to the Stop Words List in the Clipboard History Settings.
This should completely ignore adding your password to the clipboard history. Hope this help.
I appreciate the workarounds. Most of the passwords are "random" ones and second suggestion would mean putting the passwords in a "clear text" window, so that won't work, but I will try to use the first suggestion.
The rest of the app is nicely done, and I feel it will be much better if you are able to provide the deeper integration. I am not sure how that breaks privacy, but I am not a mac/win developer.
Thank you for the quick and detailed reply! Feel free to close this issue as appropriate.
Most of the passwords are "random" ones and second suggestion would mean putting the passwords in a "clear text" window, so that won't work, but I will try to use the first suggestion.
Yeah, I understand this and I agree it would make a good feature to simply block some apps from detecting the copy action. Thank you again for your suggestions. Maybe other developers can help and suggest solutions on how to create such a detection mechanism, but right now I don't know how.
Anyone who can help, please feel free to reopen this issue and suggest changes or create a PR!
There are libraries for GetWindowThreadProcessId and GetForegroundWindow through ref-napi and ffi-napi for Windows. I don't know much about Macs, but I've found this link which works through AppleScript, might help
edit: can't reopen the issue, hope my comment won't escape your attention 🙏
Found this: https://hellocode.co/blog/post/tracking-active-process-windows-rust so I'll investigate possibility to track an active app/window when user copies something to the clipboard.
@VeRychard Thank you 🙏
Found this another lib: https://github.com/dimusic/active-win-pos-rs?tab=readme-ov-file and it works on Mac and Windows. Working on apps exclude list implementation.
Found a way to retrieve and store information about the source of copied item in history and display this on hover.
Now working on Add to ignore
an app name from the clipboard history copy action.
looking good! and such quick 🥳
I added a new option in clipboard history settings to exclude apps from capturing clipboard history. Unfortunately, if an app has a copy to clipboard action from the menubar, it can't be detected; the app window must be in focus or active in the foreground. Anyway, this feature is still useful in many cases.
If anyone wants to try this out, the branch is exclude-apps-copy-to-history
What do you mean copy to clipboard from the menubar? Is this an iOS thing? I would think when you copy from somewhere it will be active / in foreground.
Anyways nice feature, an additional thing could be to filter by application in the list (now we can filter for video/emoji/etc, but since you would have a list of applications you copied from it could be filtered).
Will check it out 👌
@VeRychard I was talking about this taskbar menu.
Menu bar is MacOs equivalent of taskbar on Windows.
I just tested on Windows and it works fine and won't lose focus to another app on copy. So only copy item from menubar on MacOs would not capture the app name of actual window. Windows users should be good.
I adding an App Filter in clipboard history, this would be useful to quickly find a history items based on copy sources.
@VeRychard I was talking about this taskbar menu.
Menu bar is MacOs equivalent of taskbar on Windows.
I just tested on Windows and it works fine and won't lose focus to another app on copy. So only copy item from menubar on MacOs would not capture the app name of actual window. Windows users should be good.
Well I reckon people usually copy from right click context menu and/or Ctrl/Cmd + C (also PasteBar's taskbar icon doesn't have copy to clipboard as I saw), so I don't think that will be an issue :)
Merged #121 New Release with Excluded Apps List https://github.com/PasteBar/PasteBarApp/releases/tag/v0.5.5
Please provide an ability to exclude certain apps, such as password managers, when copying to the clipboard history.