commit 67b3c744f94cf0bf50f7052ce428e95af5a6ff3f parent d663288cb879631d7cf7c3b0e9b831eda5f953ab Author: Davide Masserut <d.masserut@gmail.com> Date: Thu, 13 Aug 2020 23:34:47 +0200 org-download.el (org-download-clipboard): Add wayland support Fixes #135 Diffstat:
| M | org-download.el | | | 12 | ++++++++++-- |
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/org-download.el b/org-download.el @@ -393,12 +393,20 @@ The screenshot tool is determined by `org-download-screenshot-method'." (let ((org-download-screenshot-method (cl-case system-type (gnu/linux - "xclip -selection clipboard -t image/png -o > %s") + (if (string= "wayland" (getenv "XDG_SESSION_TYPE")) + (if (executable-find "wl-paste") + "wl-paste -t image/png > %s" + (user-error + "Please install the \"wl-paste\" program included in wl-clipboard")) + (if (executable-find "xclip") + "xclip -selection clipboard -t image/png -o > %s" + (user-error + "Please install the \"xclip\" program")))) ((windows-nt cygwin) (if (executable-find "convert") "convert clipboard: %s" (user-error - "Please install the \"convert\" program included in ImageMagick."))) + "Please install the \"convert\" program included in ImageMagick"))) ((darwin berkeley-unix) (if (executable-find "pngpaste") "pngpaste %s"