diff --git a/lib/layout-helpers.sh b/lib/layout-helpers.sh index b293f3b..91d823c 100644 --- a/lib/layout-helpers.sh +++ b/lib/layout-helpers.sh @@ -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 +} diff --git a/runtime.sh b/runtime.sh index c7342d5..7666b44 100644 --- a/runtime.sh +++ b/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 -}