Use system for terminal if it is allowed to

This commit is contained in:
jeffser
2024-10-07 12:33:35 -06:00
parent d79a1236a0
commit 15bd4335e8
2 changed files with 21 additions and 5 deletions

View File

@@ -18,10 +18,15 @@ class terminal(Vte.Terminal):
pty = Vte.Pty.new_sync(Vte.PtyFlags.DEFAULT, None)
self.set_pty(pty)
env = {
"TERM": "xterm-256color"
}
pty.spawn_async(
GLib.get_current_dir(),
script,
[],
[f"{key}={value}" for key, value in env.items()],
GLib.SpawnFlags.DEFAULT,
None,
None,