27 lines
No EOL
794 B
Python
27 lines
No EOL
794 B
Python
import libtmux
|
|
from os import path
|
|
import libtmux.constants
|
|
|
|
path = path.dirname(__file__)+"/"
|
|
|
|
if __name__ == "__main__":
|
|
try:
|
|
server = libtmux.Server()
|
|
session = server.new_session("terradash",start_directory=path)
|
|
|
|
window = session.active_window
|
|
rpane = window.active_pane
|
|
lpane = window.split(direction=libtmux.constants.PaneDirection.Right,start_directory=path)
|
|
|
|
rpane.send_keys("clear")
|
|
lpane.send_keys("clear")
|
|
|
|
#rpane.send_keys("cd TerrariaServer")
|
|
#rpane.send_keys("mono --server --gc=sgen -O=all ./TerrariaServer.exe")
|
|
rpane.send_keys("cowsay huhu")
|
|
lpane.send_keys("python3 app.py")
|
|
|
|
server.attach_session("terradash")
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}") |