Updated tmux-sessionator and tmux config

This commit is contained in:
2023-10-03 17:08:48 -04:00
parent f55eca41f0
commit e90c491a47
2 changed files with 21 additions and 5 deletions

View File

@@ -2,10 +2,30 @@
# Adapted from: https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer
declare -a findPaths=("$HOME")
if [[ $# -eq 1 ]]; then
selected=$1
else
selected=$(find ~/projects ~/ -mindepth 1 -maxdepth 1 -type d | fzf)
# Some of my machines, projects is a symlink to $REPOS, so ignore it.
# On other machines, it is local versions of projects, so add it.
if [[ ! -L "$HOME/projects" ]]; then
findPaths+="$HOME/projects"
fi
if [[ -d "$REPOS/github.com" ]]; then
for dir in $(find "$REPOS/github.com" -mindepth 1 -maxdepth 1 -type d); do
# prepends to the array.
findPaths=($dir $findPaths)
done
fi
if [[ -d "$REPOS/local" ]]; then
# prepends to the array.
findPaths=("$REPOS/local" $findPaths)
fi
selected=$(find -L "${(@)findPaths}" -mindepth 1 -maxdepth 1 -type d | fzf)
fi
if [[ -z $selected ]]; then

View File

@@ -61,10 +61,6 @@ bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# bind -T prefix j select-pane -D
# bind -T prefix k select-pane -U
# bind -T prefix h select-pane -L
# bind -T prefix l select-pane -R
bind-key -r K kill-pane
# Use Shift-arrow keys to navigate windows.