From 7e1edc82b81d8583b48c476a75bb4029caf37294 Mon Sep 17 00:00:00 2001 From: Emiliano Sauvisky Date: Thu, 11 Apr 2019 02:41:45 -0300 Subject: [PATCH] Allows users to use rename: {calcy} without quotes --- ivcheck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ivcheck.py b/ivcheck.py index 9b86f14..3c6e435 100755 --- a/ivcheck.py +++ b/ivcheck.py @@ -249,7 +249,8 @@ async def start(self): if values["success"] is False: await self.tap('close_calcy_dialog') # it gets in the way await self.tap('rename') - if actions.get("rename", "{calcy}") != "{calcy}": # Don't bother setting clipboard if we don't need to change it + if not (actions.get("rename", "{calcy}") == "{calcy}" or ('calcy' in actions["rename"] and len(actions["rename"]) == 1)): # Don't bother setting clipboard if we don't need to change it + # also now allows users to forget to enclose {calcy} in quotes. await self.p.send_intent("clipper.set", extra_values=[["text", actions["rename"].format(**values)]]) if args.touch_paste: