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.
This commit is contained in:
sankalp committed 2026-06-16 22:24:19 +05:45
1 parent 0c266e9150
commit 7371b4fcb8
1 file changed
+3 -2
+3 -2
View File
@@ -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: