mirror of
https://github.com/davegallant/nix-config
synced 2025-08-08 05:52:28 +00:00
Update tmux-sessionizer to support a config (list of directories)
This commit is contained in:
@@ -3,10 +3,13 @@
|
|||||||
# Credit to ThePrimeagen for this:
|
# Credit to ThePrimeagen for this:
|
||||||
# https://sourcegraph.com/github.com/ThePrimeagen/.dotfiles@5cd09f06d6683b91c26822a73b40e3d7fb9af57a/-/blob/bin/.local/bin/tmux-sessionizer
|
# https://sourcegraph.com/github.com/ThePrimeagen/.dotfiles@5cd09f06d6683b91c26822a73b40e3d7fb9af57a/-/blob/bin/.local/bin/tmux-sessionizer
|
||||||
|
|
||||||
|
|
||||||
|
readarray -t directories < ~/.config/tmux-sessionizer
|
||||||
|
|
||||||
if [[ $# -eq 1 ]]; then
|
if [[ $# -eq 1 ]]; then
|
||||||
selected=$1
|
selected=$1
|
||||||
else
|
else
|
||||||
selected=$(find ~/src/github.com/davegallant -mindepth 1 -maxdepth 1 -type d | fzf --exact)
|
selected=$(find "${directories[@]}" -mindepth 1 -maxdepth 1 -type d | fzf --exact)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $selected ]]; then
|
if [[ -z $selected ]]; then
|
||||||
|
Reference in New Issue
Block a user