diff --git a/autofill/autofill.go b/autofill/autofill.go index 7c9a4cf..527ed14 100644 --- a/autofill/autofill.go +++ b/autofill/autofill.go @@ -49,7 +49,7 @@ func ListLogins(client client.Client) ([]messages.DecryptedLoginCipher, error) { } } -func Run(layout string, useCopyPaste bool, client client.Client) { +func Run(layout string, client client.Client) { logins, err := ListLogins(client) if err != nil { panic(err) @@ -70,15 +70,7 @@ func Run(layout string, useCopyPaste bool, client client.Client) { panic(err) } - if useCopyPaste { - clipboard.WriteAll(string(login.Username)) - autotype.Paste(layout) - autotype.TypeString("\t", layout) - clipboard.WriteAll(login.Password) - autotype.Paste(layout) - } else { - autotype.TypeString(string(login.Username)+"\t"+string(login.Password), layout) - } + autotype.TypeString(string(login.Username)+"\t"+string(login.Password), layout) clipboard.WriteAll(login.TwoFactorCode) c <- true diff --git a/autofill/autotype/libportalautotype.go b/autofill/autotype/libportalautotype.go index 9edc1e8..64ad3fb 100644 --- a/autofill/autotype/libportalautotype.go +++ b/autofill/autotype/libportalautotype.go @@ -68,8 +68,3 @@ func TypeString(textToType string, layout string) { } } } - -func Paste(layout string) error { - fmt.Println("Not implemented") - return nil -} diff --git a/autofill/autotype/uinputautotype.go b/autofill/autotype/uinputautotype.go index fe125c9..50bb452 100644 --- a/autofill/autotype/uinputautotype.go +++ b/autofill/autotype/uinputautotype.go @@ -7,7 +7,3 @@ import "github.com/quexten/goldwarden/autofill/autotype/uinput" func TypeString(text string, layout string) error { return uinput.TypeString(text, layout) } - -func Paste(layout string) error { - return uinput.Paste(layout) -} diff --git a/cmd/autofill.go b/cmd/autofill.go index 6ce4baf..1710720 100644 --- a/cmd/autofill.go +++ b/cmd/autofill.go @@ -13,8 +13,7 @@ var autofillCmd = &cobra.Command{ Long: `Autofill credentials`, Run: func(cmd *cobra.Command, args []string) { layout := cmd.Flag("layout").Value.String() - useCopyPaste, _ := cmd.Flags().GetBool("use-copy-paste") - autofill.Run(layout, useCopyPaste, commandClient) + autofill.Run(layout, commandClient) }, }