mirror of
https://github.com/zoriya/AnonymousGoose.git
synced 2026-05-28 12:23:20 +00:00
MERGE
This commit is contained in:
@@ -45,5 +45,7 @@ class AnonymousGoose:
|
||||
|
||||
if __name__ == "__main__":
|
||||
goose = AnonymousGoose()
|
||||
term = Term()
|
||||
print(term.tty)
|
||||
goose.run()
|
||||
goose.stop()
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import shutil
|
||||
from command_helper import CommandHelper
|
||||
|
||||
|
||||
@@ -49,7 +50,7 @@ class Term:
|
||||
if tty.isdigit():
|
||||
if int(tty) in list:
|
||||
list.remove(int(tty))
|
||||
CommandHelper.run_async(f"{Term.find_terminal()}")
|
||||
CommandHelper.run_async(Term.find_terminal())
|
||||
return f"/dev/pts/{min(list)}"
|
||||
|
||||
@staticmethod
|
||||
@@ -57,7 +58,7 @@ class Term:
|
||||
if Term.terminal:
|
||||
return Term.terminal
|
||||
for term in Term.terminal_list:
|
||||
if not CommandHelper.run(f"{term} &"):
|
||||
if shutil.which(term) is not None:
|
||||
Term.terminal = term
|
||||
return term
|
||||
|
||||
|
||||
Reference in New Issue
Block a user