diff --git a/README.md b/README.md index ee449b9..3eea060 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,12 @@ tmux-sessionizer [] if you execute tmux-sessionizer without any parameters it will assume FZF and try to fuzzy find over a set of directories. -TODO: waiting on that directory list to be dynamic :) (go a head make pr if you want) +### Setup Directories +At the path `$XDG_CONFIG_HOME/tmux-sessionizer/directories` you can define all +the directories you want the script to look over. + +``` +~/ +~/personal +~/personal/dev/env/.config +``` diff --git a/tmux-sessionizer b/tmux-sessionizer index fa1bec5..8fa4153 100755 --- a/tmux-sessionizer +++ b/tmux-sessionizer @@ -22,9 +22,7 @@ hydrate() { if [[ $# -eq 1 ]]; then selected=$1 else - # If someone wants to make this extensible, i'll accept - # PR - selected=$(find ~/ ~/personal ~/personal/dev/env/.config -mindepth 1 -maxdepth 1 -type d | fzf) + selected=$(find $(eval echo $(xargs < "$XDG_CONFIG_HOME/tmux-sessionizer/directories")) -mindepth 1 -maxdepth 1 -type d | fzf) fi if [[ -z $selected ]]; then