mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
Add send_keys layout helper
This commit is contained in:
@@ -61,6 +61,16 @@ select_pane() {
|
||||
tmux select-pane -t "$session:$window.$1"
|
||||
}
|
||||
|
||||
# Send/paste keys to the currently active pane/window.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: String to paste.
|
||||
# - $2: (optional) Target pane ID to send input to.
|
||||
#
|
||||
send_keys() {
|
||||
tmux send-keys -t "$session:$window.$2" "$1"
|
||||
}
|
||||
|
||||
# Runs a shell command in the currently active pane/window.
|
||||
#
|
||||
# Arguments:
|
||||
@@ -68,8 +78,8 @@ select_pane() {
|
||||
# - $2: (optional) Target pane ID to run command in.
|
||||
#
|
||||
run_cmd() {
|
||||
tmux send-keys -t "$session:$window.$2" "$1"
|
||||
tmux send-keys -t "$session:$window.$2" "C-m"
|
||||
send_keys "$1" "$2"
|
||||
send_keys "C-m" "$2"
|
||||
}
|
||||
|
||||
# Cusomize session root path. Default is `$HOME`.
|
||||
|
||||
Reference in New Issue
Block a user