From d7987a1bc051a4155e4d639db022b1e65e63e90d Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 4 Dec 2022 17:45:50 -0500 Subject: [PATCH] Detect Wayland sessions by checking if $WAYLAND_DISPLAY is set --- lib/sshyp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index 26cd69b..9ff576f 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -773,7 +773,7 @@ def copy_data(): # copies a specified field of an entry to the clipboard _index = 2 elif argument_list[2] == 'note' or argument_list[2] == '-n': _index = 3 - if environ.get('XDG_SESSION_TYPE') == 'wayland': # Wayland clipboard detection + if 'WAYLAND_DISPLAY' in environ: # Wayland clipboard detection run(['wl-copy', _copy_line[_index].rstrip()]) Popen('sleep 30; wl-copy -c', shell=True) elif uname()[0] == 'Haiku': # Haiku clipboard detection