diff options
-rw-r--r-- | init.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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)) |