Update clipboard plugin

This commit is contained in:
Gnarwhal 2024-09-25 01:55:16 +00:00
parent 3273aa4e4c
commit 99f2e9c3d2
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174

View file

@ -22,11 +22,11 @@ from sshare.plugin.source import Raw
plugin_type = { "source", "feedback" }
activate = {
"source": { "type" },
"source": { "extension" },
"feedback": { "to_clipboard" },
}
args = {
"type": Argument(
"extension": Argument(
name="paste",
nargs="?",
const=Flag,
@ -41,7 +41,7 @@ args = {
def get_source():
logger.info("Uploading contents of clipboard")
return Raw(config.type, pyclip.paste())
return Raw("clipboard", config.extension, pyclip.paste())
def give_feedback(location):
pyclip.copy(location)