mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Add optional target window argument to newly added layout helpers
This commit is contained in:
@@ -105,20 +105,42 @@ select_pane() {
|
|||||||
tmuxifier-tmux select-pane -t "$session:$window.$1"
|
tmuxifier-tmux select-pane -t "$session:$window.$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Balance windows vertically with the "even-vertical" layout.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# - $1: (optional) Window ID or name to operate on.
|
||||||
|
#
|
||||||
balance_windows_vertical() {
|
balance_windows_vertical() {
|
||||||
tmuxifier-tmux select-layout even-vertical
|
tmuxifier-tmux select-layout -t "$session:${1:-$window}" even-vertical
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Balance windows horizontally with the "even-horizontal" layout.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# - $1: (optional) Window ID or name to operate on.
|
||||||
|
#
|
||||||
balance_windows_horizontal() {
|
balance_windows_horizontal() {
|
||||||
tmuxifier-tmux select-layout even-horizontal
|
tmuxifier-tmux select-layout -t "$session:${1:-$window}" even-horizontal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Turn on synchronize-panes in a window.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# - $1: (optional) Window ID or name to operate on.
|
||||||
|
#
|
||||||
synchronize_on() {
|
synchronize_on() {
|
||||||
tmuxifier-tmux set-window-option synchronize-panes on
|
tmuxifier-tmux set-window-option -t "$session:${1:-$window}" \
|
||||||
|
synchronize-panes on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Turn off synchronize-panes in a window.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# - $1: (optional) Window ID or name to operate on.
|
||||||
|
#
|
||||||
synchronize_off() {
|
synchronize_off() {
|
||||||
tmuxifier-tmux set-window-option synchronize-panes off
|
tmuxifier-tmux set-window-option -t "$session:${1:-$window}" \
|
||||||
|
synchronize-panes off
|
||||||
}
|
}
|
||||||
|
|
||||||
# Send/paste keys to the currently active pane/window.
|
# Send/paste keys to the currently active pane/window.
|
||||||
|
|||||||
Reference in New Issue
Block a user