diff --git a/copy-all-stable.sh b/copy-all-stable.sh index a7d56c6..afcb586 100755 --- a/copy-all-stable.sh +++ b/copy-all-stable.sh @@ -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/. diff --git a/paste.py b/paste.py new file mode 100644 index 0000000..1568d43 --- /dev/null +++ b/paste.py @@ -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)