mattydebie / bitwarden-rofi

Wrapper for Bitwarden https://github.com/bitwarden/cli and Rofi
GNU General Public License v3.0
346 stars 56 forks source link

copy TOTP when using auto_type all #55

Closed ickerwx closed 2 years ago

ickerwx commented 4 years ago

This PR will copy the TOTP token into the clipboard when using auto_type all, this is way more convenient because you don't have to run bwmenu twice.

The modification in exit_error was necessary because the copy_totp function will call exit_error with an effectively empty error message and that would result in a rofi popup every time autotype was used and the item did not contain a TOTP token. Only showing rofi when the message is not empty did not break any other behavior during my tests.