Add xclip.el for tty clipboard support
Needs more testing
This commit is contained in:
parent
4fbf7a2687
commit
d94aa9b57c
2 changed files with 8 additions and 4 deletions
|
@ -7,6 +7,13 @@
|
|||
(unless IS-MAC (setq command-line-ns-option-alist nil))
|
||||
(unless IS-LINUX (setq command-line-x-option-alist nil))
|
||||
|
||||
;; Fix the clipboard in terminal or daemon Emacs (non-GUI)
|
||||
(defun doom|init-clipboard-in-tty-emacs ()
|
||||
(if IS-MAC
|
||||
(if (require 'osx-clipboard nil t) (osx-clipboard-mode))
|
||||
(if (require 'xclip nil t) (xclip-mode))))
|
||||
(add-hook 'tty-setup-hook #'doom|init-clipboard-in-tty-emacs)
|
||||
|
||||
;; stop copying each visual state move to the clipboard:
|
||||
;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on
|
||||
;; grokked from: http://stackoverflow.com/questions/15873346/elisp-rename-macro
|
||||
|
@ -30,10 +37,6 @@
|
|||
;; than a new one
|
||||
ns-pop-up-frames nil)
|
||||
|
||||
;; Fix the clipboard in terminal or daemon Emacs (non-GUI)
|
||||
(when (or (daemonp) (not (display-graphic-p)))
|
||||
(add-hook 'doom-init-modules-hook #'osx-clipboard-mode))
|
||||
|
||||
(when (or (daemonp) (display-graphic-p))
|
||||
;; Syncs ns frame parameters with theme (and fixes mismatching text
|
||||
;; colr in the frame title)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
;;; core/packages.el
|
||||
|
||||
;; core-os.el
|
||||
(package! xclip)
|
||||
(when IS-MAC
|
||||
(package! exec-path-from-shell)
|
||||
(package! osx-clipboard)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue