Fix clipboard in tty Emacs

xclip has support for a number of clipboard programs (xclip, xsel,
pb{copy,paste}, wl-copy, termux-clipboard and getclip).
This commit is contained in:
Henrik Lissner 2019-10-23 05:01:34 -04:00
parent f4acb3cefd
commit f34c33aa07
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 10 additions and 0 deletions

View file

@ -123,6 +123,14 @@ possible."
;; Save clipboard contents into kill-ring before replacing them
(setq save-interprogram-paste-before-kill t)
;; Fixes the clipboard in tty Emacs by piping clipboard I/O through xclip, xsel,
;; pb{copy,paste}, wl-copy, termux-clipboard-get, or getclip (cygwin).
(add-hook! 'tty-setup-hook
(defun doom-init-clipboard-in-tty-emacs-h ()
(and (not (getenv "SSH_CONNECTION"))
(require 'xclip nil t)
(xclip-mode +1))))
;;
;;; Extra file extensions to support

View file

@ -23,6 +23,7 @@
(package! dtrt-indent)
(package! helpful)
(package! ns-auto-titlebar :ignore (not IS-MAC))
(package! osx-clipboard :ignore (not IS-MAC))
(package! pcre2el)
(package! smartparens)
(package! so-long
@ -36,6 +37,7 @@
;; from emacsmirror/undo-tree instead.
:recipe (:host github :repo "emacsmirror/undo-tree"))
(package! ws-butler)
(package! xclip)
;; core-projects.el
(package! projectile)