You are not logged in.

#1 2014-07-05 19:40:10

Bailando
Member
From: Hungary
Registered: 2013-08-19
Posts: 133
Website

Clipboad manager for my issues

Hi!

I am using xfce, and my problem is that if you copy text content with mouse for example in a browser window, and then I would paste it to a terminal window (Terminator), I can't do it with usual Shift+Insert, because the so called primary selection and the "clipboard" are not syncronized. I searched in this topic, and I have found a program called "autocutsel", but it causes a different problem: I will be unable to select a text and delete/overwriting it by pasting the clipboard content, because the selected text is automatically copied to the clipboard, and I don't want to do this. I would like to use only one clipboard, as I get accustomed to in Windows years... What should I install to achieve this? Is there a clipboard manager program/ daemon which can be programmed, and I can assign actions to clipboard events? Then I could do it, because when clipboard / primary selection changes, I could run "xsel" with the appropriate options.

My other problem: sometimes I would like to use multiple clipboards, and paste different text content by different key combinations. For example when I got a lot of messages on a dating site, and I would like to answer them, my answers are already written and saved in a text document. I would copy them to different clipboards, and I would paste them according to the actual message. Maybe there is such a good clipboard manager which can support both task I delineated above.

Last edited by Bailando (2014-07-05 19:41:34)

Offline

#2 2014-07-05 20:07:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Clipboad manager for my issues

I can select text with my mouse and then paste it with middle mouse button or Shift+Ins.
First select and remove the old text, paste the new text later.
vim has multiple clipboards. I'm typing this post in vim, which I called from firefox.

Offline

#3 2014-07-06 06:28:40

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: Clipboad manager for my issues

So basically you want the two atoms synced asymmetrically? PRIMARY gets everything that goes on to CLIPBOARD but CLIPBOARD does not get everything that goes on to PRIMARY?


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#4 2014-07-06 07:02:13

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: Clipboad manager for my issues

I tried synchronizing PRIMARY and CLIPBOARD once and it always gets in my way. I have two hotkeys to do it manually.

primary to clip [Ctrl-Alt-C]: xsel -o | exec xsel -ib
clip to primary [Ctrl-Alt-X]: xsel -ob | exec xsel -i

Edit: I'd do something similar for your multiple clipboard problem. Create one file per clipboard and write your text in there. Then add a hotkey with something like this:

ls ~/clips | dmenu | xargs -I '$///$' cat ~'/clips/$///$' | xsel -ib

Last edited by progandy (2014-07-06 07:22:34)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2014-07-10 12:49:13

Bailando
Member
From: Hungary
Registered: 2013-08-19
Posts: 133
Website

Re: Clipboad manager for my issues

ConnorBehan wrote:

So basically you want the two atoms synced asymmetrically? PRIMARY gets everything that goes on to CLIPBOARD but CLIPBOARD does not get everything that goes on to PRIMARY?


I don't know exactly which is the PRIMARY, SECONDARY and CLIPBOARD. But I make this task very often: I copy a text / link from a GUI window, usually a browser to the "clipboard" with Right click + Copy text / link. Then I would like to paste the link / text to a terminal window, in which I use the keyboard, so I would simply press Shift + Insert. I have accustomed to this key combination in MS-DOS era and QBasic... Unfortunately when I press Shift + Insert, the pasted content is not what I copied to the "clipboard" most recently, instead of I get a text/link what I copied previously somewhere with Ctrl + Insert, or nothing if that another clipboard is still empty.

Last edited by Bailando (2014-07-10 12:54:10)

Offline

#6 2014-07-10 13:22:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: Clipboad manager for my issues

There are actually 8 (or so) default selections in X.  Most people only every use PRIMARY and CLIPBOARD.  While applications can do various other things with them, the standard and expected behavior is that whenever text is selected with the mouse (often then highlighted or reversed text) it is placed in the PRIMARY selection.  When a menu option like "copy" or "cut" is used, the copy/cut content is then placed in the CLIPBOARD selection.

Shift-Ins or Shift+middle-mouse-button will paste the PRIMARY selection.  An application must request the CLIPBOARD selection for pasting (often through a menu option to "paste").

From what you describe as the desired behavior, it seems the easiest would simply be to remap/rebind the shift+insert combination to call `xsel -b` and not worry about syncing anything.

EDIT: of course if one of the existing clipboard managers will do a one-way sync without much hassle, that might be easiest - I've never used any of clipboard management tools aside from xsel, and I rarely use that one.

Last edited by Trilby (2014-07-10 13:26:33)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB