def get_result_item(self, con): (_, appName, winTitle) = windows.app_details(con) return ExtensionResultItem( icon=get_icon(con), name=winTitle, description=appName, # This only works because con is a dict, and therefore pickleable on_enter=ExtensionCustomAction(con))
def matches_query(self, con, query): '''Enable word-wise fuzzy searching''' (_, appName, winTitle) = windows.app_details(con) s = (appName + " " + winTitle).lower() for word in query: if word not in s: return False return True