Hi,
not sure if this the right category to showcase projects (let me know if it is not), but I would like to introduce a GPG plugin for Kate that I have written.
I keep some private data saved as GPG encrypted text files on my Desktop for easy double-click access because I am a Desktop icon messie…
Until 2012 or so there was the seahorse plugin for (Gnomes’s) gedit which allowed to simply decrypt, edit and re-encrypt those files. Unfortunately this plugin was discontinued somewhere around that time.
The replacement since then was a GPG script for vim, which works well enough, but for quite a while I wanted a solution integrated into my preferred texteditor. Since I had switched to KDE a while ago I made an attempt to write a plugin for Kate.
Meanwhile this is working good enough for me that I can use it on a regular basis and don’t use vim for that anymore.
The major aim was to have decryption, editing and (re-)encryption seamlessly integrated into a simple editing task, i.e. double-click a .gpg/.asc file, prompt for password, edit and finally upon pressing Ctrl+S automatically re-encrypt the file. When there are multiple private keys available for the user, the plugin shall auto-select the detected decryption key for eventual re-encryption (this is something that I couldn’t get working in the vim script), minimizing the chance to save a decrypted file unencrypted or encrypted with a wrong key.
The plugin settings are quite extensive but as long as only simple editing and re-encrypting a file with the same key is required, the settings can remain hidden.
(Auto-) Encryption only happens when saving with a .gpg/.asc file extension.
I have also tested KGpg which required additional clicks and behaved less seamless than I had hoped.
Not sure how helpful this is for others, but I thought there might be at least some use for it.
@Christoph_Cullmann
I have looked into that and think I can get that done, but I will need advice on how to manage the external libgpgmepp dependency. So far all addons I have looked at do not use any external libs except for QT/KDE/KF6 stuff. So I suspect my plugin may be … “special” in that regard. But also maybe that’s a question that I will try to get answered somewhere else.
I think one just needs to find the library in the addon subdir of your thing and if not found skip building it. How to search the gpgme stuff best with CMake would to be looked up in some online docs.
To put the question more clearly: Would the plugin even be considered for upstream when relying on a dependency installed via package manager?
Finding the library with CMake is not an issue as long as it is installed via package manager. But I think bundling GPGMe(pp) and its dependencies as part of the plugin is. Especially when considering the possibility for conflicts with versions installed via package manager.