From 60773cad28b36360a4704121833e8d99c585b536 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 29 Aug 2022 00:47:46 +0100 Subject: sway niceties (clipboard, specially) --- init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 63d617d..933a79c 100644 --- a/init.el +++ b/init.el @@ -458,7 +458,8 @@ (jao-swaymsg ,msg))) (jao-def-swaymsg firefox "[app_id=firefox] focus") -(defvar jao-sway-enabled (and (featurep 'pgtk) (not jao-xmonad-enabled))) +(defvar jao-sway-enabled + (string= "wayland" (or (getenv "XDG_SESSION_TYPE") ""))) (defconst jao-sway-get-active-title "swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true).name'") @@ -505,8 +506,7 @@ (defun jao-sway-enable () (interactive) (defalias 'x-change-window-property #'ignore) - (setq jao-sway-enabled t) - (jao-set-transparency 85) + (when (eq 'pgtk window-system) (jao-set-transparency 85)) (jao-themes-setup) (jao-trisect) (message "Welcome to sway")) @@ -599,7 +599,8 @@ xterm-select-active-regions t) (use-package xclip - :ensure t) + :ensure t + :init (setq xclip-method (if jao-sway-enabled 'wl-copy 'xclip))) (unless (display-graphic-p) (xclip-mode 1)) -- cgit v1.2.3