mattydebie / bitwarden-rofi

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

Added support for wl-clipboard (Wayland). #11

Closed AndreasBackx closed 5 years ago

AndreasBackx commented 5 years ago

Should be self-explanatory.

AndreasBackx commented 5 years ago

There needs to be a refactor to get red of xdotool perhaps. Wayland doesn't support faking of keyboard input like Xorg does. I don't understand how that part of the code works completely, but would it be possible to refactor that so it doesn't need xdotool and therefore work on Wayland?

mattydebie commented 5 years ago

Thanks for the PR! This is looking fine. If I'm not mistaken you do not need xdotool to run bwmenu, it will only crash once you do one of the alt+[1-3] commands. I could however check for the presence of xdotool?

mattydebie commented 5 years ago

I think 9f7e75d5ea12c02de84e570132fce591fc294a5b fixes your issue. Right? :grinning:

AndreasBackx commented 5 years ago

Thanks for merging, that commit also is great. Though what is xdotool used for here? Would it be possible for me to provide an alternative implementation?

mattydebie commented 5 years ago

Xdotool types the username and or the password. That way you can 'autofill' forms so you don't need to copy and paste. I read that Wayland does not support this for security reasons so I'm not sure what could be done for Wayland.. Every proposal is welcome 😊

AndreasBackx commented 5 years ago

Why does it need to be typed?

mattydebie commented 5 years ago

It's just for convenience. When you try to login to github for example, you could open bwmenu, search github, press alt+1, then xdotool presses the keys forming your username, then tab, then presses the keys forming your password. the result is that the login form contains your credentials

AndreasBackx commented 5 years ago

I found out that ydotool exists that does the same things as xdotool but without the need for Xorg, so I assume it works for both. Though I’m on my phone right now and might not be able to try it out till Monday (if I don’t forget). You could give that a shot as well.