Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Secondary actions menu #32

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

nwallace
Copy link
Contributor

@nwallace nwallace commented Oct 15, 2019

I would often like more options when interacting with the items in my vault. Currently, bwmenu allows you to:

  1. Copy your password
  2. Copy your TOTP
  3. Auto-type username
  4. Auto-type password
  5. Auto-type username & password

Here are some things I would love to be able to do, but currently cannot:

  1. Open the item's URI in my default browser
  2. Copy the username and password at the same time (one to clipboard, the other to primary selection)
  3. Copy the username and password while opening the URI in my browser
  4. Copy custom fields
  5. ??

This pull request is a work-in-progress take on how this could work. With these changes, when you select a vault item with Enter, instead of copying the password, it opens a second menu that provides you with a list of actions for that item, which execute when selected.

The list of actions is dynamic and particular to the selected item. If the item doesn't have a URI, the URI-related actions aren't included. Actions should depend, also, on the type of item (credit card, login item, identity, etc).

I think the additional abilities and control you get with this secondary menu are great. Being able to copy both your username and password at the same time is a huge speed boon as well.

The code is not ready to be merged yet, but I wanted to open the PR now anyway to start the discussion. Is this something you'd be interested in? I don't believe there need to be any real drawbacks.

Here's the current status of the code:

  • Display secondary menu
  • Action to copy username
  • Action to copy password
  • Action to copy TOTP
  • Action to open URI
  • Action to copy username & password
  • Action to copy username & password, open URI
  • Actions to auto-type username/password/both
  • Action to show everything in the item
  • Action to display notes
  • Actions to copy custom fields
  • Notifications (rudimentary)
  • Clear clipboard after timeout
  • Support SHOW_PASSWORD variable
  • Sort actions sensibly
  • Handle Login items
  • Handle Card items
  • Handle Identity items
  • Handle Secure Note items

@nwallace nwallace force-pushed the feature/actions-menu branch 5 times, most recently from 26d0fcc to 232ed4a Compare October 23, 2019 17:16
@nwallace
Copy link
Contributor Author

@mattydebie Have you had a chance to try this out? It's mostly fleshed out, but there are refactorings I think would be great, but some of the existing functionality will be difficult (though not impossible) to preserve.

The biggest behavior that's going to be difficult to preserve is the Alt shortcuts for copying & autotyping. At the moment, they work, but the code for the Alt shortcut duplicates knowledge in the secondary menu generation. I'd like to DRY that up, and I have an idea to do so that might work, but it's going to get pretty ugly because Bash just doesn't have great support for structured data.

Personally, I think this secondary menu is better than the Alt shortcuts, but it would be slower for someone with muscle memory for the Alt shortcuts. Can I ditch them, or should I try to preserve them with some wild bashery?

@nwallace nwallace force-pushed the feature/actions-menu branch from de3496f to b891627 Compare April 20, 2021 21:02
chelmertz added a commit to chelmertz/bitwarden-rofi that referenced this pull request Oct 21, 2021
I always try to use shift+Insert in terminals, so I want the password in
the primary selection as well.

I realize not everybody wants this,
mattydebie#32 for example is
proposing a workflow of copying username into one selection, and
password into another.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant