Make App launch with uwsm

This commit is contained in:
tr1x_em committed 2025-08-03 12:09:01 +05:30
1 parent 129cf3851a
commit fd1b77b59f
1 file changed
+12 -2
+12 -2
View File
@@ -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]: