Arch has a https://www.archlinux.org/packages/extra/any/kde-agent/">
kde-agent package which starts its own GPG/SSH
agent on KDE startup.
This package replaces
kde-agent. Instead of starting its own set of agents,
it runs zsh in interactive mode, grabs the GPG/SSH agent-related environment
variables, and uses those instead. This way you don't end up with four agents.
Make sure that the following environment variables are exported in your ZSH environment:
Additionally, if you keep your environment variables stored in stateful files, make sure the following environment variables are exported as well:
If exported, the files they refer to will be deleted on shutdown. This is not guaranteed, however (since you may have a power outage or something), so make sure that your ZSH startup script also takes care of ignoring those if they contain stale values.
kde-agent-zsh is licensed under the WTFPL. Enjoy.