mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da1354d5b7 | |||
| f01c789de4 | |||
| b52ef20be8 | |||
|
|
212693b1e9 | ||
| 908152bb57 | |||
| a0365273d0 | |||
| 6c8777adc2 | |||
|
|
5e33aefa7d |
@@ -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:
|
||||
@@ -112,11 +144,16 @@ window_root() {
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: Name of window layout to load.
|
||||
# - $2: Override default window name.
|
||||
#
|
||||
load_window() {
|
||||
local file="$TMUXIFIER_LAYOUT_PATH/$1.window.sh"
|
||||
if [ -f "$file" ]; then
|
||||
window="$1"
|
||||
if [ $# -gt 1 ]; then
|
||||
window="$2"
|
||||
else
|
||||
window="$1"
|
||||
fi
|
||||
source "$file"
|
||||
window=
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ set -e
|
||||
|
||||
# Set shell to first argument that is not "-", "-h" or "--help".
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" != "-" ] &&[ "$arg" != "-h" ] && [ "$arg" != "--help" ]; then
|
||||
if [ "$arg" != "-" ] && [ "$arg" != "-h" ] && [ "$arg" != "--help" ]; then
|
||||
shell="$arg"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -13,4 +13,4 @@ Outputs Tmuxifier version."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "0.7.1"
|
||||
echo "0.7.3"
|
||||
|
||||
Reference in New Issue
Block a user