mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
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
This commit is contained in:
+2
-2
@@ -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'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user