mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 01:46:40 +00:00
Reorganize functions a bit
This commit is contained in:
@@ -29,6 +29,30 @@ select_window() {
|
||||
tmux select-window -t "$session:$1"
|
||||
}
|
||||
|
||||
# Cusomize session root path. Default is `$HOME`.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: Directory path to use for session root.
|
||||
#
|
||||
session_root() {
|
||||
local dir="$(__expand_path $@)"
|
||||
if [ -d "$dir" ]; then
|
||||
session_root="$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# Customize window root path. Default is `$session_root`.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: Directory path to use for window root.
|
||||
#
|
||||
window_root() {
|
||||
local dir="$(__expand_path $@)"
|
||||
if [ -d "$dir" ]; then
|
||||
window_root="$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# Load specified window layout.
|
||||
#
|
||||
# Arguments:
|
||||
@@ -71,30 +95,6 @@ load_session() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Cusomize session root path. Default is `$HOME`.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: Directory path to use for session root.
|
||||
#
|
||||
session_root() {
|
||||
local dir="$(__expand_path $@)"
|
||||
if [ -d "$dir" ]; then
|
||||
session_root="$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# Customize window root path. Default is `$session_root`.
|
||||
#
|
||||
# Arguments:
|
||||
# - $1: Directory path to use for window root.
|
||||
#
|
||||
window_root() {
|
||||
local dir="$(__expand_path $@)"
|
||||
if [ -d "$dir" ]; then
|
||||
cd "$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# Create a new session, returning 0 on success, 1 on failure.
|
||||
#
|
||||
# Arguments:
|
||||
|
||||
Reference in New Issue
Block a user