summaryrefslogtreecommitdiffstatshomepage
path: root/tmux
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-10-03 18:10:55 -0500
committerToby Vincent <tobyv13@gmail.com>2022-10-03 18:13:43 -0500
commitb1b173298e72d05ab3e909e67f9fdb95b5bb682e (patch)
tree3096dea853ff2acd0e55c76b36a134324d0b73e8 /tmux
parent2a78cfa98ef6a68fc2cc38f28594ae4992e85e0f (diff)
feat(tmux): improve sessionizer preview
Diffstat (limited to 'tmux')
-rwxr-xr-xtmux/.local/bin/tmux-sessionizer6
1 files changed, 4 insertions, 2 deletions
diff --git a/tmux/.local/bin/tmux-sessionizer b/tmux/.local/bin/tmux-sessionizer
index 22ee13f..11e4fdd 100755
--- a/tmux/.local/bin/tmux-sessionizer
+++ b/tmux/.local/bin/tmux-sessionizer
@@ -41,8 +41,10 @@ else
' | sort -r | sort -t':' -r -k2 | uniq -s10 | sort -r | cut -d':' -f2 | sed "s#^$attached\$##g" | sed '/^$/d')"
output="$(printf %s\\n "$DIRS" | fzf-tmux -p -- --print-query -d/ --with-nth -1 \
- --preview="$FZF_PREVIEW_COMMAND ||
- printf '%s' {q} | sed 's|/\$||' | xargs hut git show 2>/dev/null ||
+ --preview-window=right,75% --preview="onefetch {} 2>/dev/null ||
+ ([ -e {}/README.md ] && glow --style=dark {}/README.md 2>/dev/null) ||
+ exa --tree --git-ignore --level=3 --icons {} 2>/dev/null ||
+ (printf '%s' {q} | sed 's|/\$||' | xargs hut git show --repo 2>/dev/null && glow {q}/blob/HEAD/README.md --style=dark 2>/dev/null) ||
gh repo view {q} 2>/dev/null ||
printf 'Create new project:\n %s' {q} |
sed 's|^ \([^/~][^/]*\)\$| $HOME/\1|' |