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:
parent
f4acb3cefd
commit
f34c33aa07
2 changed files with 10 additions and 0 deletions
|
@ -123,6 +123,14 @@ possible."
|
||||||
;; Save clipboard contents into kill-ring before replacing them
|
;; Save clipboard contents into kill-ring before replacing them
|
||||||
(setq save-interprogram-paste-before-kill t)
|
(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
|
;;; Extra file extensions to support
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
(package! dtrt-indent)
|
(package! dtrt-indent)
|
||||||
(package! helpful)
|
(package! helpful)
|
||||||
(package! ns-auto-titlebar :ignore (not IS-MAC))
|
(package! ns-auto-titlebar :ignore (not IS-MAC))
|
||||||
|
(package! osx-clipboard :ignore (not IS-MAC))
|
||||||
(package! pcre2el)
|
(package! pcre2el)
|
||||||
(package! smartparens)
|
(package! smartparens)
|
||||||
(package! so-long
|
(package! so-long
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
;; from emacsmirror/undo-tree instead.
|
;; from emacsmirror/undo-tree instead.
|
||||||
:recipe (:host github :repo "emacsmirror/undo-tree"))
|
:recipe (:host github :repo "emacsmirror/undo-tree"))
|
||||||
(package! ws-butler)
|
(package! ws-butler)
|
||||||
|
(package! xclip)
|
||||||
|
|
||||||
;; core-projects.el
|
;; core-projects.el
|
||||||
(package! projectile)
|
(package! projectile)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue