You are not logged in.

#1 2016-01-22 16:25:19

jonaspf
Member
Registered: 2016-01-22
Posts: 2

cpmerge: a simple clipboard manager to sync CLIPBOARD and PRIMARY

I know this thread is ancient but it is the first thing that came up in google. With autocutsel I had the same problem as phrakture: Copy something into the clipboard; Select text I want to overwrite with the clipboard content -> Original clipboard content is lost. So I wrote a little tool to solve this: http://jonaspfannschmidt.com/cpmerge.html

My solution works as follows:
CLIPBOARD gets always copied to PRIMARY
PRIMARY gets copied to CLIPBOARD only if the mouse moved by a certain distance

This allows me to: Copy text into clipboard; Select some text (Do not move mouse much after this step); Hit CTRL+V to overwrite selected text with clipboard.

Offline

#2 2016-01-30 06:37:31

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: cpmerge: a simple clipboard manager to sync CLIPBOARD and PRIMARY

Note: The above post has been split from the following thread: https://bbs.archlinux.org/viewtopic.php?pid=1599899

Offline

#3 2016-01-30 08:36:45

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: cpmerge: a simple clipboard manager to sync CLIPBOARD and PRIMARY

jonaspf wrote:

I know this thread is ancient but it is the first thing that came up in google. With autocutsel I had the same problem as phrakture: Copy something into the clipboard; Select text I want to overwrite with the clipboard content -> Original clipboard content is lost. So I wrote a little tool to solve this: http://jonaspfannschmidt.com/cpmerge.html

My solution works as follows:
CLIPBOARD gets always copied to PRIMARY
PRIMARY gets copied to CLIPBOARD only if the mouse moved by a certain distance

This allows me to: Copy text into clipboard; Select some text (Do not move mouse much after this step); Hit CTRL+V to overwrite selected text with clipboard.

I can already do what you describe with clipit


You can like linux without becoming a fanatic!

Offline

#4 2016-02-02 20:03:31

jonaspf
Member
Registered: 2016-01-22
Posts: 2

Re: cpmerge: a simple clipboard manager to sync CLIPBOARD and PRIMARY

chickenPie4tea wrote:

I can already do what you describe with clipit

I used clipit for a while and while it does synchronize the clipboards, it does so immediately. So the use-case mentioned above (Select text and overwrite it with the clipboard content) doesn't work for me because any selection immediately overwrites the clipboard content. How did you get around that with clipit? It would be great if it worked. Clipit is certainly a better/more mature software than my hacked together script.

Best Regards,
Jonas

Last edited by jonaspf (2016-02-02 20:03:53)

Offline

#5 2016-02-03 08:09:31

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: cpmerge: a simple clipboard manager to sync CLIPBOARD and PRIMARY

It just works for me,
in the setting tab I only have "use copy" (ctrl-c) ticked
I dont have synchronize clipboards ticked, so I guess you need to untick that.


You can like linux without becoming a fanatic!

Offline

Board footer

Powered by FluxBB