🔧 - This commit adds example configurations for several features and widgets, including app launcher, status bar, bluetooth widget, desktop widget, icon browser, notifications, and side panel.
This commit is contained in:
14 files changed
+1596
-12
No files matched your search
@@ -1266,6 +1266,5 @@ class Launcher(Window):
|
||||
if not is_trigger_suggestion and not keep_launcher_open:
|
||||
self.close_launcher()
|
||||
# For trigger suggestions and keep_launcher_open actions, the launcher stays open
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error activating result: {e}")
|
||||
@@ -15,22 +15,13 @@ class ApplicationsPlugin(PluginBase):
|
||||
super().__init__()
|
||||
self.display_name = "Applications"
|
||||
self.description = "Search and launch desktop applications"
|
||||
self.applications = []
|
||||
|
||||
def initialize(self):
|
||||
# Set up triggers for applications - both with and without spaces
|
||||
self.set_triggers(["app"])
|
||||
self._load_applications()
|
||||
|
||||
def cleanup(self):
|
||||
self.applications = []
|
||||
|
||||
def _load_applications(self):
|
||||
try:
|
||||
self.applications = get_desktop_applications(include_hidden=False)
|
||||
except Exception as e:
|
||||
print(f"Failed to load applications: {e}")
|
||||
self.applications = []
|
||||
pass
|
||||
|
||||
def _pin_application(self, app):
|
||||
"""Pin an application to the dock."""
|
||||
@@ -82,10 +73,17 @@ class ApplicationsPlugin(PluginBase):
|
||||
if not query_string.strip():
|
||||
return []
|
||||
|
||||
# Get fresh applications list each time (like examples/app-launcher)
|
||||
try:
|
||||
applications = get_desktop_applications(include_hidden=False)
|
||||
except Exception as e:
|
||||
print(f"Failed to load applications: {e}")
|
||||
applications = []
|
||||
|
||||
query = query_string.lower().strip()
|
||||
results = []
|
||||
|
||||
for app in self.applications:
|
||||
for app in applications:
|
||||
relevance = self._calculate_relevance(app, query)
|
||||
if relevance > 0:
|
||||
# Truncate description to prevent overflow beyond 550px window
|
||||
|
||||
Reference in new issue
Block a user