From 4040342a3ca0d38622fff8142a50dcc45ffeced6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Fri, 6 Oct 2023 14:47:53 +0200 Subject: [PATCH] feat(tmux): compile tmux sessionizer and remove tpm --- tmux/tmux-sessionizer | 5 ++++- tmux/tmux.conf | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tmux/tmux-sessionizer b/tmux/tmux-sessionizer index bfeb7c8..9e2d6d2 100755 --- a/tmux/tmux-sessionizer +++ b/tmux/tmux-sessionizer @@ -3,7 +3,10 @@ if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(find -L $GGROOT -mindepth 1 -maxdepth 5 -type d -name .git -prune | xargs -n 1 dirname | fzf --cycle --multi --bind 'tab:toggle-up,btab:toggle-down') + if ! [[ -f "$GGROOT/compiled" ]]; then + find -L $GGROOT -mindepth 1 -maxdepth 5 -type d -name .git -prune | xargs -n 1 dirname > "$GGROOT/compiled" + fi + selected=$(cat "$GGROOT/compiled" | fzf) fi if [[ -z $selected ]]; then diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 904fa40..3c3ce00 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -32,5 +32,3 @@ bind-key -r g run-shell "tmux neww ~/.config/tmux/tmux-sessionizer $XDG_CONFIG_H bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/Desktop/temp" bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~" -# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) -run '~/.config/tmux/plugins/tpm/tpm'