Created
April 25, 2021 01:24
-
-
Save kekeimiku/02335434a1297cd843d8bd862aa04dfc to your computer and use it in GitHub Desktop.
emacs use wl-copy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq wl-copy-process nil) | |
(defun wl-copy (text) | |
(setq wl-copy-process (make-process :name "wl-copy" | |
:buffer nil | |
:command '("wl-copy" "-f" "-n") | |
:connection-type 'pipe)) | |
(process-send-string wl-copy-process text) | |
(process-send-eof wl-copy-process)) | |
(defun wl-paste () | |
(if (and wl-copy-process (process-live-p wl-copy-process)) nil | |
(shell-command-to-string "wl-paste -t text -n 2>/dev/null"))) | |
(setq interprogram-cut-function 'wl-copy) | |
(setq interprogram-paste-function 'wl-paste) | |
(setq confirm-kill-processes nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment