refactor: Improve tmux API consistency and formatting
- Refactor `logs_get_new` to use `LogsGetArgs` struct - Return window as reference from `window_new` - Standardize indentation and spacing - Remove excessive blank lines - Comment out initial example usage
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
||||
|
||||
|
||||
import freeflowuniverse.herolib.osal.tmux
|
||||
|
||||
mut t := tmux.new()!
|
||||
if !t.is_running()! {
|
||||
t.start()!
|
||||
}
|
||||
if t.session_exist('main') {
|
||||
t.session_delete('main')!
|
||||
}
|
||||
// Create session first, then create window
|
||||
mut session := t.session_create(name: 'main')!
|
||||
session.window_new(name: 'test', cmd: 'mc', reset: true)!
|
||||
|
||||
// Or use the convenience method
|
||||
// t.window_new(session_name: 'main', name: 'test', cmd: 'mc', reset: true)!
|
||||
// if !t.is_running()! {
|
||||
// t.start()!
|
||||
// }
|
||||
// if t.session_exist('main') {
|
||||
// t.session_delete('main')!
|
||||
// }
|
||||
// // Create session first, then create window
|
||||
// mut session := t.session_create(name: 'main')!
|
||||
// session.window_new(name: 'test', cmd: 'mc', reset: true)!
|
||||
|
||||
// // Or use the convenience method
|
||||
// // t.window_new(session_name: 'main', name: 'test', cmd: 'mc', reset: true)!
|
||||
|
||||
println(t)
|
||||
|
||||
Reference in New Issue
Block a user