ajrosen / Alfred

Alfred workflows
32 stars 2 forks source link

getting password from a WiFiPassword #9

Closed arvdsar closed 3 years ago

arvdsar commented 3 years ago

I have some wifipasswords stored in a specific item for wifipasswords. These were not showing at all in 2.2.3, but now in v3.0.1 they are displayed when doing lpass xxxx. When copying it copies the whole item and not only the password or SSID. Is it possible to add this?

on the Command-line I would do something like this: for SSID it is a specific field: lpass show --id 39845895 --field=SSID

for password it is: lpass show --id 39845895 --password

ajrosen commented 3 years ago

Honestly it would be quite difficult to do. The list of results comes from lpass ls, which doesn't know what fields are inside secure notes. It doesn't even know what kind of note it is because the note's type is just another field in the item; otherwise I'd use modifiers to select different fields for different note types. Using lpass show to create the list would be far too slow, and would have problems with items that require reprompt.

However, you can select and copy any part of the window that comes up.

ajrosen commented 3 years ago

...but it did make me wonder if I could use a temp file and bypass the clipboard completely. Version 3.1.0 does that.

Thanks!

arvdsar commented 3 years ago

What did you accomplish by using a temp file? I don't notice different behavior. I assume your statement that only copying Password from a secure note is still valid and you did another optimization? It still is a great workflow though ;-)

ajrosen commented 3 years ago

I don't want the workflow to disturb the clipboard unless it really has to, or it's told to. I hadn't realized it was replacing the contents for secure notes and considered it a bug ;). The new version leaves the clipboard alone.

When you see the results list, all the workflow knows is that "this item is a secure note, not a passsword". I can't tell what type of note it is (WiFi, SSN, bank account, etc.) until after you select it, so I can't know what field(s) to copy by default. Instead it copies nothing to the clipboard and lets you copy/paste from the dialog.

Thanks for using, and the feedback!

arvdsar commented 3 years ago

I got it! Thanks.