mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user