Feature request(s): unidirectional sync, sync without history
foghawk opened this issue · 4 comments
I would like to have new selections copied from CLIPBOARD
to PRIMARY
, but not vice versa. Ideally, I would like to do so without enabling the history feature.
(xcmenu supposedly does this, but it seems to be buggy and its maintenance history isn't promising. I'm not aware of any other no-GUI clipboard manager that can.)
I can put in a PR, if you're willing to offer opinions on:
- how the configuration should be set up,
- how unidirectional sync should interact with history, and
- whether it's really necessary to sync only between "active" selections. (It seems to me that it's not, but perhaps there's a technical reason I haven't spotted just from looking over the code.)
Thanks!
Hi - I'm just tidying up issues here and spotted that I'd missed this one - many apologies!
Please let me know if you're still using clipster and are still up for making a PR for this feature - otherwise I'll close this one.
No problem; glad to hear from you.
I've never used clipster, but am definitely up for a PR anyway. (xcmenu really is unacceptably buggy. Earlier today I went to paste a link into a chat client and instead sent the text I'd copied from my password manager several selections before. I got mad, changed the password, swore I'd finally do something about this, forgot about it, then checked my email and saw this reply. Serendipitous!)
That's great to hear! It's been a while since I did any major work on adding features to clipster
but I think this one should be relatively easy to implement.
I think the easiest option would be to make sync_selections
take options rather than just be a boolean
value. Maybe something like:
- False = don't sync at all
- True = sync in both directions
- 'to_primary' = sync from
clipboard
toprimary
- 'to_clipboard' = sync from
primary
toclipboard
The 2 places that would need updated are in update_history
(around line 455) and delete_handler
(around line 252).
test_sync_selections
in the test suite could then be duplicated and tweaked for the 2 new 'direcitonal' syncs.
Let me know if this sounds like something you'd be up for making a PR for - happy to review and comment on one, but not got the time just now to implement it myself!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.