set fish_greeting function sesh-sessions set -l session (sesh list -t -c | fzf --height 40% --reverse --border-label ' sesh ' --border --prompt '⚡ ') commandline -f repaint if test -z "$session" return end sesh connect $session end function sesh-list set -l session (sesh list --icons | fzf \ --height 40% \ --reverse \ --border-label ' sesh ' \ --border \ --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 {2..})+change-prompt(⚡ )+reload(sesh list --icons)' \ --preview-window 'right:55%' \ --preview 'sesh preview {}' \ --prompt '⚡ ') commandline -f repaint if test -z "$session" return end sesh connect $session end # Keybinding: Alt-s if functions -q fish_vi_key_bindings bind -M default \es sesh-sessions bind -M insert \es sesh-sessions else bind \es sesh-sessions end # Keybinding: Alt-t if functions -q fish_vi_key_bindings bind -M default \et sesh-list bind -M insert \et sesh-list else bind \et sesh-list end alias vim "nvim"