26 lines
No EOL
555 B
Bash
26 lines
No EOL
555 B
Bash
#!/bin/bash
|
|
|
|
# windows = konsole tabs
|
|
# panes = konsole splits
|
|
|
|
# Send keys to a tmux pane
|
|
tmux_send_keys() {
|
|
local pane="$1"
|
|
local keys="$2"
|
|
tmux send-keys -t "$pane" "$keys" C-m
|
|
}
|
|
|
|
# Capture pane content from tmux
|
|
tmux_capture_pane() {
|
|
local pane="$1"
|
|
tmux capture-pane -p -t "$pane"
|
|
}
|
|
|
|
# List all available tmux panes
|
|
tmux_list_panes() {
|
|
tmux list-panes -F "#{window_id} #{pane_id} #{pane_title} #{pane_current_command}"
|
|
}
|
|
|
|
tmux_list_windows() {
|
|
tmux list-windows -F "#{window_id} #{window_name} #{window_current_command}"
|
|
} |