Added paste.py

This commit is contained in:
James Booth
2016-03-01 01:15:59 +00:00
parent 614a647bb1
commit 2ce12450fd
2 changed files with 19 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ rm -rf ~/.local/share/profanity/plugins/*
cp ascii.py ~/.local/share/profanity/plugins/.
cp syscmd.py ~/.local/share/profanity/plugins/.
cp paste.py ~/.local/share/profanity/plugins/.
cp browser.py ~/.local/share/profanity/plugins/.
cp platform-info.py ~/.local/share/profanity/plugins/.
cp say.py ~/.local/share/profanity/plugins/.

18
paste.py Normal file
View File

@@ -0,0 +1,18 @@
import prof
import sys
import Tkinter as tk
def _cmd_paste():
root = tk.Tk(baseName="")
root.withdraw()
result = root.clipboard_get()
prof.cons_show(u'\u000A' + result)
def prof_init(version, status):
synopsis = [
"/paste"
]
description = "Paste contents of clipboard."
args = []
examples = []
prof.register_command("/paste", 0, 0, synopsis, description, args, examples, _cmd_paste)