Support for wayland clipboard
This commit is contained in:
15
init.el
15
init.el
@@ -84,6 +84,21 @@
|
||||
(setq auto-save-default nil)
|
||||
(setq create-lockfiles nil)
|
||||
|
||||
(when (getenv "WAYLAND_DISPLAY")
|
||||
;; Without this, copy and pasting from other wayland apps into
|
||||
;; emacs-pgtk doesn't work.
|
||||
;; https://www.emacswiki.org/emacs/CopyAndPaste#h5o-4
|
||||
(setq wl-copy-process nil)
|
||||
(defun wl-copy (text)
|
||||
(setq wl-copy-process (make-process :name "wl-copy"
|
||||
:buffer nil
|
||||
:command '("wl-copy" "-f" "-n")
|
||||
:connection-type 'pipe
|
||||
:noquery t))
|
||||
(process-send-string wl-copy-process text)
|
||||
(process-send-eof wl-copy-process))
|
||||
(setq interprogram-cut-function 'wl-copy))
|
||||
|
||||
;; Dired settings
|
||||
(defun embark-open-externally (file)
|
||||
"Open FILE externally using the default application of the system."
|
||||
|
||||
Reference in New Issue
Block a user