Ben Collver <benco...@tilde.pink> wrote:
> I will keep an eye out for something that can work system-wide.
clipnotify looks very close to what you need.
https://github.com/cdown/clipnotify/blob/master/clipnotify.c
The only problem is that it notifies both changes in clipboard and
primary without telling which selection was actually changed.
Just comment this line in the source:
/* XFixesSelectSelectionInput(disp, root, clip, XFixesSetSelectionOwnerNotifyMask); */
and call it primarynotify.c
Compile it and run in the shell
while primarynotify; do
xclip -o -selection primary | xclip -i -selection clipboard
done
NOTE: I have not tested this.