#! /bin/zsh # # this file: # https://dataswamp.org/~incal/scripts/xi # # xterm & tty (tmux) and Emacs clipboard # # see: # https://dataswamp.org/~incal/conf/.tmux.conf # https://dataswamp.org/~incal/conf/.zsh/x # https://dataswamp.org/~incal/emacs-init/linux-shell.el # https://dataswamp.org/~incal/emacs-init/xsel.el if (( $# )); then text=$* else read -d \\0 a text=$a fi echo -n $text | DISPLAY=":0" xsel -b -i