Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-selection PRIMARY - no effect? #6

Open
AladW opened this issue Feb 27, 2016 · 3 comments
Open

-selection PRIMARY - no effect? #6

AladW opened this issue Feb 27, 2016 · 3 comments

Comments

@AladW
Copy link

AladW commented Feb 27, 2016

According to the README:

By default, autocutsel synchronizes the CLIPBOARD selection. You may want to use
the PRIMARY selection instead, if your applications use Motif or another toolkit
not using the CLIPBOARD. 

As I understand it, running autcutsel -selection PRIMARY makes sure CLIPBOARD is synchronized to PRIMARY. However, this doesn't seem to work:

archie@thinkpad ~ % echo $TERM
xterm-256color
archie@thinkpad ~ % autocutsel -selection PRIMARY -fork
archie@thinkpad ~ % echo foo | xsel -i -b
archie@thinkpad ~ % bar # Shift+Insert

Adding -verbose -debug to the command gives no output with the above, except the version number:

archie@thinkpad ~ % autocutsel -selection PRIMARY -verbose -debug
autocutsel v0.10.0
@Docbroke
Copy link

Docbroke commented Dec 29, 2016

sharad ~ > echo primary | xclip -i
sharad ~ > echo clipboard | xclip -sel c
sharad ~ > xclip -o
primary
sharad ~ > xclip -o -sel c
clipboard
sharad ~ > autocutsel -fork && autocutsel -selection PRIMARY -fork
sharad ~ > echo test | xclip -i
sharad ~ > xclip -o
test
sharad ~ > xclip -o -sel c
test

You need to use both "autocutsel -fork" and "autocutsel -selection PRIMARY -fork"

@AladW
Copy link
Author

AladW commented Jan 4, 2017

Except I don't want primary synced to clipboard. Only the other way around.

@Docbroke
Copy link

Docbroke commented Jan 5, 2017

well AFAIK, autocutsel by default syncs cutbuffer with clipboard, and when you use -selection PRIMARY it syncs cutbuffer with primary (not primary with clipboard as you have interpreted) so if you want to sync primary with clipboard you will need two instances of autocutsel so that all buffers are in sync. I don't see any way to make one-way sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants