yardnsm / tmux-1password

:key: Access your 1Password login items within tmux!
MIT License
252 stars 24 forks source link

Add the possibility to customize how to copy to clipboard. #21

Closed mrswats closed 4 years ago

mrswats commented 4 years ago

The idea behind this PR is to add customisation on the clipboard. For example, I use xsel instead but if you are on LInux working on wayland, xclip might not work or you could be running another clipboard manager whatsoever. This solves the issue by adding two configuration keys.

mrswats commented 4 years ago

There are a couple of things: I am not sure if the way the password is being passed to the clipboard manager is correct. I also know that documentation is missing, once I got everything figured out I will update documentation for this feature.

mrswats commented 4 years ago

@yardnsm Can you have a minute to look at this? :)

yardnsm commented 4 years ago

Hey @mrswats, I'm sorry for the delay 😬

Looks good! However, I would prefer not adding new configuration keys for this plugin for this specific feature. Instead, we can simply check is xsel exists on the system, just like in https://github.com/rafi/tmux-pass/blob/master/scripts/utils.sh#L26-L36 (a fork of this plugin).

WDYT?

mrswats commented 4 years ago

That should fix it indeed! Makes much more sense and it's true that adding more configuration keys is not ideal.