diff --git a/core/core-editor.el b/core/core-editor.el index a3ff19309..b780e2b8c 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -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 diff --git a/core/packages.el b/core/packages.el index d9db6dd7e..5a6a1725a 100644 --- a/core/packages.el +++ b/core/packages.el @@ -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)