update tmux popup config

This commit is contained in:
Alexander Navarro 2024-08-28 12:05:05 -04:00
parent f98b2c56b0
commit 99f717efcb
3 changed files with 31 additions and 12 deletions

View file

@ -1,16 +1,17 @@
#!/usr/bin/env bash
exclude="(scratch)" # exclude this entries, use regex: /(name1|name2)/
sesh connect "$(
sesh list --hide-attached --icons |
rg --invert-match '(scratch)' | # exclude this entries, use regex: /(name1|name2)/
fzf-tmux -p 55%,60% \
--no-sort --border-label ' sesh ' --prompt '⚡ ' \
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
--bind 'tab:down,btab:up' \
--bind 'ctrl-a:change-prompt(⚡ )+reload(sesh list --hide-attached --icons)' \
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --hide-attached --icons)' \
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --hide-attached --icons)' \
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --hide-attached --icons)' \
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
--bind 'ctrl-d:execute(tmux kill-session -t {})+change-prompt(⚡ )+reload(sesh list --hide-attached --icons)'
rg --invert-match "$exclude" | fzf-tmux -p 55%,60% \
--no-sort --border-label ' sesh ' --prompt '⚡ ' \
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
--bind "tab:down,btab:up" \
--bind "ctrl-a:change-prompt(⚡ )+reload(sesh list --hide-attached --icons | rg --invert-match '$exclude')" \
--bind "ctrl-t:change-prompt(🪟 )+reload(sesh list -t --hide-attached --icons | rg --invert-match '$exclude')" \
--bind "ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --hide-attached --icons | rg --invert-match '$exclude')" \
--bind "ctrl-x:change-prompt(📁 )+reload(sesh list -z --hide-attached --icons | rg --invert-match '$exclude')" \
--bind "ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)" \
--bind "ctrl-d:execute(tmux kill-session -t {2})+change-prompt(⚡ )+reload(sesh list --hide-attached --icons | rg --invert-match '$exclude')"
)"

17
scripts/fzf-tmux-tools-popup Executable file
View file

@ -0,0 +1,17 @@
#! /usr/bin/env bash
set -e
declare -A tools
tools[Lazygit]="lazygit"
tools[Databases]="cd ~/.local/share/db_ui; nvim -c 'DBUI'"
cli="$(printf "%s\n" "${!tools[@]}" | fzf)"
cli="${tools[$cli]}"
if [[ -z "$cli" ]]; then
exit
fi
eval "$cli"