✨ feat(osd): add OSD for brightness, volume, and microphone controls

This commit is contained in:
sankalp committed 2025-06-16 18:58:34 +05:45
1 parent 99421153ab
commit 90ebffe6dd
15 files changed
+520 -1231

No files matched your search

-54
View File
@@ -1,54 +0,0 @@
import re
from typing import List, Dict, Any
from . import LauncherPlugin
class CalculatorPlugin(LauncherPlugin):
"""Plugin for calculator functionality"""
@property
def name(self) -> str:
return "Calculator"
@property
def category(self) -> str:
return "Utilities"
@property
def icon_name(self) -> str:
return "accessories-calculator-symbolic"
def search(self, query: str) -> List[Dict[str, Any]]:
# Only process if query looks like a math expression
if not (query.isdigit() or re.match(r"^[\d+\-*/().]+$", query)):
return []
try:
result = eval(query)
return [
{
"title": f"{query} = {result}",
"description": "Calculator result",
"icon_name": "accessories-calculator-symbolic",
"action": lambda: None, # No action needed
}
]
except:
return []
def get_action_items(self, query: str) -> List[Dict[str, Any]]:
# Only process if query looks like a math expression
if not (query.isdigit() or re.match(r"^[\d+\-*/().]+$", query)):
return []
try:
result = eval(query)
return [
{
"title": f"Calculate: {query} = {result}",
"icon_name": "accessories-calculator-symbolic",
"action": lambda: None, # No action needed
}
]
except:
return []