diff options
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: |
