Skip to content

Instantly share code, notes, and snippets.

(defun xsel-select-text (text &optional push)
"See `x-select-text'."
(let* ((process-connection-type nil)
(proc (start-process "xsel" nil "xsel" "-b" "-i")))
(process-send-string proc text)
(process-send-eof proc)))
(defun xsel-selection-value ()
"See `x-cut-buffer-or-selection-value'."
(shell-command-to-string "xsel -b -o"))