Skip to content

Instantly share code, notes, and snippets.

@legumbre
Created July 7, 2012 21:12
Show Gist options
  • Save legumbre/3068106 to your computer and use it in GitHub Desktop.
Save legumbre/3068106 to your computer and use it in GitHub Desktop.
(defun to-x-clip (text)
(let* ((process-connection-type)
(xsel (start-process "xsel" (get-buffer-create "*xsel*") "xsel" "-i" "-b")))
(process-send-string xsel text)
(process-send-eof xsel)))
(to-x-clip "hello there")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment