How-tos  Scripts  Pricing  Testimonials  Support  Newsletter

Tested on OpenBSD 6.3

Use X11 clipboard with xclip(1)

Use X11 clipboard to copy paste text and images between X11 programs.

Install xclip(1):

# pkg_add xclip
xclip-0.13p0: ok

Edit ~/.tmux.conf:

bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel \
  'xclip -i -selection clipboard'

bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel \
  'xclip -i -selection clipboard'

bind -n MouseDown2Pane run \
  'tmux set-buffer "$(xclip -o -selection clipboard)";tmux paste-buffer'

Edit ~/.exrc:

map gp :r!xclip -o -s clipboard^M

where ^M is CTRL+V then Enter.

© 2008–2019 Roman Zolotarev  User Agreement  Privacy Policy