2016-05-02 21:15:29 +02:00
|
|
|
#!/usr/bin/env bash
|
2016-04-30 00:35:52 +02:00
|
|
|
|
|
|
|
function array_join() {
|
|
|
|
local IFS="$1"; shift; echo "$*";
|
|
|
|
}
|
|
|
|
|
|
|
|
function display_message() {
|
|
|
|
local original_display_time=$(tmux show-option -gqv display-time)
|
|
|
|
tmux set-option -g display-time $2
|
|
|
|
tmux display-message "$1"
|
|
|
|
tmux set-option -g display-time $original_display_time
|
|
|
|
}
|
2016-04-30 02:42:56 +02:00
|
|
|
|
|
|
|
function revert_to_original_pane() {
|
|
|
|
local current_pane_id=$1
|
|
|
|
local fingers_pane_id=$2
|
2016-05-02 21:15:29 +02:00
|
|
|
tmux swap-pane -s "$current_pane_id" -t "$fingers_pane_id"
|
|
|
|
tmux kill-pane -t "$fingers_pane_id"
|
2016-04-30 02:42:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function pane_exec() {
|
|
|
|
local pane_id=$1
|
|
|
|
local pane_command=$2
|
|
|
|
|
2016-05-12 10:45:38 +02:00
|
|
|
tmux send-keys -t $pane_id " $pane_command"
|
2016-04-30 02:42:56 +02:00
|
|
|
tmux send-keys -t $pane_id Enter
|
|
|
|
}
|