We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36aac1a commit d9489f2Copy full SHA for d9489f2
README.md
@@ -85,14 +85,17 @@ Create and drive a tmux session entirely from Python.
85
import libtmux
86
import time
87
88
+# Connect to tmux (starts one if not running)
89
server = libtmux.Server()
90
+# Unique name avoids collisions on repeated runs
91
session_name = f"libtmux-demo-{int(time.time())}"
92
session = server.new_session(session_name=session_name, window_name="workspace")
93
94
window = session.active_window
95
left = window.active_pane
96
right = window.split_window(vertical=True)
97
98
+# Send commands to panes
99
left.send_keys("vim", enter=True)
100
right.send_keys("htop", enter=True)
101
0 commit comments