From 7371b4fcb86a037207034fc0e7a238bb17eb7a05 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Tue, 16 Jun 2026 22:24:19 +0545 Subject: [PATCH] refactor(src/window): replace subprocess.Popen with exec_shell_command_async in dock.py Use async-friendly API and drop shell=True to enhance safety and performance. --- src/window/dock.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/window/dock.py b/src/window/dock.py index fa117b4..e74998b 100644 --- a/src/window/dock.py +++ b/src/window/dock.py @@ -10,6 +10,7 @@ from fabric.utils import ( os, random, re, + exec_shell_command_async, ) from fabric.widgets.box import Box from fabric.widgets.button import Button @@ -443,8 +444,8 @@ class AppBar(Box): if command_line: cleaned_command = re.sub(r"%\w+", "", command_line).strip() - final_command = f"hyprctl dispatch exec 'uwsm app -- {cleaned_command}'" - subprocess.Popen(final_command, shell=True) + final_command = f"hyprctl dispatch 'hl.dsp.exec_cmd([[uwsm app -- {cleaned_command}]])'" + exec_shell_command_async(final_command) elif hasattr(app_info, "launch"): app_info.launch() else: