naglfar / krunner-keepassxc

A small krunner plugin to copy keepassxc entries to clipboard using its Freedesktop.org Secret Service dbus integration.
MIT License
27 stars 3 forks source link

[Discussion] Adding a trigger word and shortening the runner name #12

Closed bugzy closed 2 years ago

bugzy commented 2 years ago

Trigger word:

Currently the runner plugin searches for the KeepassXC entries as soon as you type more than two characters in krunner. I am wondering if the behavior can be changed to use a trigger word mainly so that others do not see account information/titles when I am looking for other things in krunner. In brief, for privacy purposes. I believe that the only line that needs a change is this one to something like: if query.lower().startswith('pw'): query.replace("pw","") However, you may have a specific reason for the present behavior so I thought to point out the privacy issue.

.desktop Name value:

Krunner uses the Name in the .desktop to categorize krunner results. The name "KeepassXC to Clipboard" is pretty long so it takes up a a chunk of space. I am wondering if the name can be shortened. Some suggestions are:

Again thanks for the runner, it is a great help.

naglfar commented 2 years ago

The main issue why I didn't do a trigger word is because there's no way to provide a settings dialog with krunner plugins through dbus, i.e. it's only possible through a "real" plugin providing a qt dialog if I remember correctly, so I just set it up the way I wanted to use it myself. I guess I could handle options via a config file, I'm not a huge fan of that because it'll be a bit hidden / you need to expect people to read the documentation, but I guess that's not as big an issue for most linux users.

As for the name, I agree it's a bit long, but I'm not really a fan of any of the suggestions... I don't really want to call it just "KeepassXC" since I don't want people to think it's related to the main project, but I don't feel shortening it to KXC is a good idea either. And while the plugin should work with other secrets providers I never actually tested this, so I don't feel confident going more generic. At least on my system shortening the name wouldn't really make much of a difference either, since krunner seems to reserve a fixed amount of space for the plugin names either way.

naglfar commented 2 years ago

I just put out version 1.7.0, now on start a config file gets created in your XDG_CONFIG_HOME, i.e. probably ~/.config/krunner-keepassxc/ there you can add a trigger and change a few other more or less useful parameters, config gets applied on restart. I would've added runner name as a config option, but I think that only gets read from the .desktop file so there's not much I can do from the actual script.