From 1fc854dbdd2f5b1ceb5b5e8beb04f5314d16203d Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 30 Apr 2012 02:12:01 +0100 Subject: [PATCH] Move internal runtime functions to layout-helpers.sh file --- lib/layout-helpers.sh | 24 ++++++++++++++++++++++++ runtime.sh | 24 ------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) 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 -}