[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronizing buffers

From: Artur Skonecki
Subject: Re: Synchronizing buffers
Date: Wed, 4 Jul 2012 19:06:14 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Tue, 3 Jul 2012, address@hidden wrote:
I am trying to synchronize the screen buffer and the primary selection
using the .screenrc and xclip. That's why I added this lines to my
.screenrc :

# set the second mark, write to the screen-exchange
# file, and use xsel to synchronize the paste buffer
# with the X selection.
bindkey -m > eval "stuff ' '" writebuf 'exec sh -c "xclip /tmp/screen-exchange"'

# Write from the X buffer in screen
#bind < eval "exec sh -c 'xsel > /tmp/screen-exchange'" readbuf "stuff '^a]'"
bind < eval "exec sh -c 'xclip -o > /tmp/screen-exchange'" readbuf 'paste .'

This doesn't work, actually some tests based of the structure :
`bindkey -m […] 'exec sh -c "cat /tmp/screen-exchange > tmp"'
make me think that my screen-exchange is not readable while the command
is running. The file `tmp' is created but nothing is written into it.

Once the command is done though, a `cat /tmp/screen-exchange' gives me
the right content.

Hi Cédric,
Escape GNU Screen configuration quirks by executing commands sequentially
with "screen -X".  I am using xsel, since xclip seems to misbehave for
me. Also, Your :bufferfile should probably be set to a different filename
than "/tmp/screen-exchange".

bufferfile "$HOME/.screen-exchange"
bindkey -m > eval "stuff ' '" 'exec sh -c "screen -X writebuf && xsel -i < 
bind < eval 'exec sh -c "xsel > $HOME/.screen-exchange && screen -X readbuf && 
screen -X paste ."'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]