Trying to get clipboard into paste buffer

David Woodfall <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <20180530224644.GD1303@blackswan>
I'm using the following bind to get the x clipboard into the paste
buffer and then paste it:

bind P eval 'exec sh -c "xsel -n -o -b > /tmp/screen-exchange"' 'readbuf' 'paste .'

There seems to be some kind of timing problem, because readbuf seems
to execute before xsel has pasted and pastes the old contents of
screen-exchange. If I execute it twice, it works as it should.

If I just have the xsel command it does copy into screen-exchange so
I know that that's working, and I can then run 'c-a < c-a ]' and it
works that way too.

I tried adding a sleep command in there but it didn't make any
difference.

Any ideas on how to get this working?

--

A Linux machine!  Because a 486 is a terrible thing to waste!
  -- Joe Sloan, [email protected]

                                                            .--.  oo
                                                           (____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.