Simplify tmux-session-hydrate logic; update tmux key binds
This commit is contained in:
@@ -5,10 +5,7 @@ tmux_switch_to() {
|
||||
}
|
||||
|
||||
tmux_hydrate() {
|
||||
local tmux_hydrate_files_dir="$XDG_CONFIG_HOME/tmux/session-hydrate-files"
|
||||
local tmux_hydrate_path="$tmux_hydrate_files_dir/.tmux-session-hydrate-default"
|
||||
[[ $1 = "thinking" ]] && tmux_hydrate_path="$tmux_hydrate_files_dir/.tmux-session-hydrate-thinking"
|
||||
[[ $1 = "listening" ]] && tmux_hydrate_path="$tmux_hydrate_files_dir/.tmux-session-hydrate-listening"
|
||||
local tmux_hydrate_path="$XDG_CONFIG_HOME/tmux/.tmux-session-hydrate-default"
|
||||
[[ -f $2/.tmux-session-hydrate ]] && tmux_hydrate_path="$2/.tmux-session-hydrate"
|
||||
[[ -f $tmux_hydrate_path ]] && tmux send-keys -t $1 "source $tmux_hydrate_path" c-M
|
||||
}
|
||||
@@ -27,8 +24,6 @@ tmux_target_path=''
|
||||
|
||||
if [[ $tmux_target_path = "." ]]; then tmux_target_name=$(basename $(pwd)) && tmux_target_path=$(pwd);
|
||||
elif [[ $tmux_target_path = "hub" ]]; then tmux_target_name="hub" && tmux_target_path="$HOME";
|
||||
elif [[ $tmux_target_path = "thinking" ]]; then tmux_target_name="thinking" && tmux_target_path="$DIR_SCRATCH_NOTES";
|
||||
elif [[ $tmux_target_path = "listening" ]]; then tmux_target_name="listening" && tmux_target_path="$DIR_MUSIC";
|
||||
elif [[ -n $tmux_target_path ]]; then tmux_target_name=$(basename "$tmux_target_path" | tr . _);
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user