Änderung init-ui -> Konfiguration für WSL (Debian) für Copy-Paste angepasst

This commit is contained in:
knedlik
2026-04-07 12:39:24 +02:00
parent b230f57ff0
commit ac89ecc2df

View File

@@ -31,23 +31,43 @@
(unless (display-graphic-p) (unless (display-graphic-p)
(xterm-mouse-mode 1)) (xterm-mouse-mode 1))
(when (file-exists-p "/etc/arch-release")
;; Clipboard
(setq select-enable-clipboard t)
(setq select-enable-primary t)
;; Wayland-Terminal Clipboard via wl-copy / wl-paste
(unless (display-graphic-p)
(setq interprogram-cut-function
(lambda (text &optional _push)
(let ((process-connection-type nil))
(let ((proc (start-process "wl-copy" nil "wl-copy")))
(process-send-string proc text)
(process-send-eof proc)))))
(setq interprogram-paste-function
(lambda ()
(string-trim-right
(shell-command-to-string "wl-paste -n 2>/dev/null"))))))
;; Clipboard ;; Clipboard
(setq select-enable-clipboard t) ;; (setq select-enable-clipboard t)
(setq select-enable-primary t) ;; (setq select-enable-primary t)
;; Wayland-Terminal Clipboard via wl-copy / wl-paste ;; ;; Wayland-Terminal Clipboard via wl-copy / wl-paste
(unless (display-graphic-p) ;; (unless (display-graphic-p)
(setq interprogram-cut-function ;; (setq interprogram-cut-function
(lambda (text &optional _push) ;; (lambda (text &optional _push)
(let ((process-connection-type nil)) ;; (let ((process-connection-type nil))
(let ((proc (start-process "wl-copy" nil "wl-copy"))) ;; (let ((proc (start-process "wl-copy" nil "wl-copy")))
(process-send-string proc text) ;; (process-send-string proc text)
(process-send-eof proc))))) ;; (process-send-eof proc)))))
(setq interprogram-paste-function ;; (setq interprogram-paste-function
(lambda () ;; (lambda ()
(string-trim-right ;; (string-trim-right
(shell-command-to-string "wl-paste -n 2>/dev/null"))))) ;; (shell-command-to-string "wl-paste -n 2>/dev/null")))))
;; Hintergrund etwas neutraler ;; Hintergrund etwas neutraler
(set-face-background 'default "#1e1e1e") (set-face-background 'default "#1e1e1e")