diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2021-10-15 18:30:15 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2021-10-15 18:30:15 +0200 |
| commit | 4429dc95e4b91986836a9350a35c378137c52912 (patch) | |
| tree | 2d089c52ab391adfb83531339c167a7b468d868a /clipboard.py | |
| parent | 8672543a495f70756aeca42177f615da1a91c755 (diff) | |
Diffstat (limited to 'clipboard.py')
| -rw-r--r-- | clipboard.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clipboard.py b/clipboard.py index b511313..1eb1e59 100644 --- a/clipboard.py +++ b/clipboard.py @@ -1,5 +1,14 @@ import subprocess +def paste(target=None): + extra_args = [] + + return subprocess.run( + ['xclip', '-sel', 'clip', '-t', 'text/plain', '-o'] + extra_args, + universal_newlines=True, + stdout=subprocess.PIPE + ).stdout + def copy(string, target=None): extra_args = [] if target != None: |
