mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
23 lines
1.1 KiB
Fish
23 lines
1.1 KiB
Fish
function fzf_sesh_connect --description "fzf-powered sesh session selector"
|
|
set -l session (
|
|
sesh list --icons | fzf-tmux -p 80%,70% \
|
|
--no-sort --ansi \
|
|
--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 --icons)' \
|
|
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \
|
|
--bind 'ctrl-g:change-prompt(⚙️ )+reload(sesh list -c --icons)' \
|
|
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
|
|
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
|
|
--bind 'ctrl-d:execute(tmux kill-session -t $(echo {} | cut -d\" \" -f2-))+change-prompt(⚡ )+reload(sesh list --icons)' \
|
|
--preview-window 'right:55%' \
|
|
--preview 'sesh preview {}'
|
|
)
|
|
|
|
if test -n "$session"
|
|
sesh connect "$session"
|
|
end
|
|
end
|