From fd1b77b59f5debe787d264b95f3d5cffa33234d4 Mon Sep 17 00:00:00 2001 From: tr1x_em Date: Sun, 3 Aug 2025 12:09:01 +0530 Subject: [PATCH] Make App launch with uwsm --- modules/launcher/plugins/applications.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/launcher/plugins/applications.py b/modules/launcher/plugins/applications.py index 00d02bc..d9463b5 100644 --- a/modules/launcher/plugins/applications.py +++ b/modules/launcher/plugins/applications.py @@ -156,10 +156,20 @@ class ApplicationsPlugin(PluginBase): pattern = ".*".join(re.escape(char) for char in query) return bool(re.search(pattern, text, re.IGNORECASE)) + import subprocess + def _launch_application(self, app: DesktopApp): - print(app.command_line) - final_command = f"hyprctl dispatch exec uwsm app -- { app.command_line}" + print("Original:", app.command_line) + + # Remove ALL % codes (e.g., %u, %U, %f, %F, %i, %c, etc.) + cleaned_command = re.sub(r"%\w+", "", app.command_line).strip() + + print("Cleaned:", cleaned_command) + + # Final command with hyprctl dispatch + final_command = f"hyprctl dispatch exec 'uwsm app -- {cleaned_command}'" subprocess.Popen(final_command, shell=True) + # app.launch() def _get_all_applications(self) -> List[Result]: