diff --git a/src_files/.config/git/ignore b/src_files/.config/git/ignore new file mode 100644 index 0000000..53550ee --- /dev/null +++ b/src_files/.config/git/ignore @@ -0,0 +1,5 @@ +.tool-versions +*.swp +*.swo +.tmux-session-hydrate + diff --git a/src_files/.local/bin/.tmux-session-hydrate b/src_files/.local/bin/.tmux-session-hydrate index 3668964..6e59d92 100644 --- a/src_files/.local/bin/.tmux-session-hydrate +++ b/src_files/.local/bin/.tmux-session-hydrate @@ -4,6 +4,7 @@ local omitted_dirs=( $HOME $HOMEBOX $DEVDIR + $DEVDIR/git ) [[ ! ${omitted_dirs[(re)$(pwd)]} ]] && tmux new-window -d -n cmd && diff --git a/src_files/.local/bin/tmux-sessionizer b/src_files/.local/bin/tmux-sessionizer index f898227..b58ce62 100755 --- a/src_files/.local/bin/tmux-sessionizer +++ b/src_files/.local/bin/tmux-sessionizer @@ -15,18 +15,22 @@ hydrate() { } local search_dirs=( - $HOME $HOMEBOX $DEVDIR - $DEVDIR/git $DEVDIR/git/* ) local selected_path='' [[ $# -eq 1 ]] && selected_path=$1 || - selected_path=$(find $search_dirs -mindepth 1 -maxdepth 1 -type d | fzf) + selected_path=$( + find $search_dirs -mindepth 1 -maxdepth 1 -type d | + (echo 'hub' && cat) | + fzf + ) [[ -z $selected_path ]] && exit 0 -local selected_name=$(basename "$selected_path" | tr . _) +local selected_name='' +[[ "$selected_path" = "hub" ]] && selected_name="hub" && selected_path=$HOME || + selected_name=$(basename "$selected_path" | tr . _) ! (tmux_session_exists $selected_name) && tmux new-session -d -s $selected_name -c $selected_path && diff --git a/zxcv-todo b/zxcv-todo index 2dd11ae..d96efc5 100644 --- a/zxcv-todo +++ b/zxcv-todo @@ -1 +1,2 @@ add numbers/letters to sort and run scripts in particular order +add tmux sessionizer template(s) to copy/paste for common, non-default settings