modified: lib/layout-helpers.sh

added split_hl and split_hl and split_vl which split with a count of
columns/lines instead of by percentage,  and clock which starts
clock-mode.  Comments for each added.
This commit is contained in:
Lawrence Siebert
2013-06-19 23:35:13 -07:00
parent e15ae597e4
commit 5e33aefa7d

View File

@@ -45,6 +45,38 @@ split_h() {
__go_to_window_or_session_path
}
# Split current window/pane vertically by line count.
#
# Arguments:
# - $1: (optional) Number of lines the new pane will use.
# - $2: (optional) Target pane ID to split in current window.
#
split_vl() {
if [ -n "$1" ]; then local count=(-l "$1"); fi
tmux split-window -t "$session:$window.$2" -v "${count[@]}"
__go_to_window_or_session_path
}
# Split current window/pane horizontally by column count.
#
# Arguments:
# - $1: (optional) Number of columns the new pane will use.
# - $2: (optional) Target pane ID to split in current window.
#
split_hl() {
if [ -n "$1" ]; then local count=(-l "$1"); fi
tmux split-window -t "$session:$window.$2" -h "${count[@]}"
__go_to_window_or_session_path
}
#run clock mode
#
# Arguments:
# - $1: (optional) Target pane ID in which to run
clock() {
tmux clock-mode -t "$session:$window.$1"
}
# Select a specific window.
#
# Arguments: