firecat53 / keepmenu

Dmenu/Rofi frontend for Keepass databases
GNU General Public License v3.0
204 stars 32 forks source link

Adding configurable shortcuts to avoid "View/Type individual entries" #139

Open Purtl opened 2 years ago

Purtl commented 2 years ago

Heyho, what do you think about the following "scenario":

with an entry in the config like: [shortcuts] password: title: username: url: ...

At the moment that is (correct me if i'm wrong) only possible by:

firecat53 commented 2 years ago

That already exists :smile: Look at the Auto Type sequences in the docs. If you always only want to type the password without the username or hitting enter and nothing else, edit the entry, select Autotype and enter {PASSWORD}.

Does that match what you're looking for?

vaygr commented 2 years ago

I guess the biggest part of the request here is shortcuts, so with different shortcuts you could have different autotype sequences.

firecat53 commented 2 years ago

I think I see what you're saying. I'll have to think about if that's something I want to pursue.

In the meantime, you could possibly work around that using the -a flag to keepmenu. For example, you can have one keyboard shortcut that calls keepmenu like normal, and a second shortcut that calls keepmenu -a '{TOTP}' to only type the TOTP values.

vaygr commented 2 years ago

Yeah, exactly. TOTP is a special case though. If I have 800 entries and TOTP ones are only 50 of them, it makes little sense to output all for filtering using dmenu. That's why I came up with #132.

firecat53 commented 2 years ago

So you'd basically have to create "temporary" duplicate entries with the different autotype values when generating the list to display to dmenu. I'm thinking that could work similar to how I have done the multiple URLs feature. That way the configuration file stays simple and only the autotype entries would need to be edited.

vaygr commented 2 years ago

Precisely. So keepmenu has to be smart to see if there's only {TOTP} in autotype, generate the list only of those entries that contain it.