diff options
author | jao <jao@gnu.org> | 2022-08-29 00:47:46 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-08-29 00:48:40 +0100 |
commit | 60773cad28b36360a4704121833e8d99c585b536 (patch) | |
tree | 4fed7b85b9dce3b8b39d873e1eec1864b5640cb9 | |
parent | 0cff3365a6b20b6d736a8f428a7a2899b1c6b9df (diff) | |
download | elibs-60773cad28b36360a4704121833e8d99c585b536.tar.gz elibs-60773cad28b36360a4704121833e8d99c585b536.tar.bz2 |
sway niceties (clipboard, specially)
-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)) |