mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Move internal runtime functions to layout-helpers.sh file
This commit is contained in:
@@ -162,3 +162,27 @@ finalize_and_go_to_session() {
|
||||
__go_to_session
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Internal functions
|
||||
#
|
||||
|
||||
# Expands given path.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# $ __expand_path "~/Projects"
|
||||
# /Users/jimeh/Projects
|
||||
#
|
||||
__expand_path() {
|
||||
echo $(eval echo "$@")
|
||||
}
|
||||
|
||||
__go_to_session() {
|
||||
if [ -z $TMUX ]; then
|
||||
tmux -u attach-session -t "$session"
|
||||
else
|
||||
tmux -u switch-client -t "$session"
|
||||
fi
|
||||
}
|
||||
|
||||
24
runtime.sh
24
runtime.sh
@@ -10,27 +10,3 @@ session_root="$HOME"
|
||||
|
||||
# Load layout helper functions.
|
||||
source "$TMUXIFIER/lib/layout-helpers.sh"
|
||||
|
||||
|
||||
#
|
||||
# Internal functions
|
||||
#
|
||||
|
||||
# Expands given path.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# $ __expand_path "~/Projects"
|
||||
# /Users/jimeh/Projects
|
||||
#
|
||||
__expand_path() {
|
||||
echo $(eval echo "$@")
|
||||
}
|
||||
|
||||
__go_to_session() {
|
||||
if [ -z $TMUX ]; then
|
||||
tmux -u attach-session -t "$session"
|
||||
else
|
||||
tmux -u switch-client -t "$session"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user