From 7e1961e0ecc676c25433763cebbb3fadbe0a1f7a Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 26 Oct 2023 18:32:47 -0400 Subject: [PATCH] Fix empty clipboard warnings being shown to the user on Wayland if the same entry field is copied multiple times within 30 seconds Former-commit-id: ef5415a793eaf8088f857331872181b40ef4d78f Former-commit-id: c1521a73d443c173cd2b23f18f71f99fc54b0eb6 --- lib/clipclear.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/clipclear.py b/lib/clipclear.py index afc83ea..c1b1599 100755 --- a/lib/clipclear.py +++ b/lib/clipclear.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 from hashlib import sha512 -from subprocess import PIPE, run +from subprocess import DEVNULL, PIPE, run from sys import argv from time import sleep @@ -16,7 +16,7 @@ if argv[2] == 'wsl': run(('powershell.exe', '-c', 'Set-Clipboard')) elif argv[2] == 'wayland': - hash_paste.update(run('wl-paste', stdout=PIPE).stdout.strip()) + hash_paste.update(run('wl-paste', stdout=PIPE, stderr=DEVNULL).stdout.strip()) if argv[1] == hash_paste.hexdigest(): run(('wl-copy', '-c'))