🔧 - Changes the prefix and suffix values for various launcher actions in the constants.py file.

This commit is contained in:
sankalp committed 2025-06-20 23:04:18 +05:45
1 parent 0360227ed4
commit 63334f6569
25 files changed
+1395 -184

No files matched your search

+18 -6
View File
@@ -58,24 +58,36 @@ class PowerPlugin(PluginBase):
def query(self, query_string: str) -> List[Result]:
"""Search power commands based on query."""
if not query_string.strip():
return []
query = query_string.lower().strip()
results = []
for cmd, info in self.commands.items():
if query in cmd.lower() or query in info["description"].lower():
# If no query, show all power commands
if not query:
for cmd, info in self.commands.items():
result = Result(
title=cmd.capitalize(),
subtitle=info["description"],
icon_markup=info["icon"],
action=info["action"],
relevance=1.0 if query == cmd else 0.7,
relevance=1.0,
plugin_name=self.display_name,
data={"command": cmd},
)
results.append(result)
else:
# Filter commands based on query
for cmd, info in self.commands.items():
if query in cmd.lower() or query in info["description"].lower():
result = Result(
title=cmd.capitalize(),
subtitle=info["description"],
icon_markup=info["icon"],
action=info["action"],
relevance=1.0 if query == cmd else 0.7,
plugin_name=self.display_name,
data={"command": cmd},
)
results.append(result)
return results