#!/bin/sh # @(#)$KimmoSuominen: .cfg/home/misc/tmux-window-switcher,v 1.7 2026/04/25 03:41:43 kim Exp $ # ~/misc/tmux-window-switcher sel=$(~/misc/tmux-window-list | fzf-tmux -p 90%,70% \ --exact --no-sort --ansi --border-label ' windows ' --prompt ' 󱂬 ' \ --header '^a all ^s session ^d kill window' \ --bind 'tab:down,btab:up' \ --bind "ctrl-a:reload(~/misc/tmux-window-list -a)" \ --bind "ctrl-d:execute-silent(tmux kill-window -t :{2})+reload(~/misc/tmux-window-list)" \ --bind "ctrl-s:reload(~/misc/tmux-window-list)" \ --preview-window 'right:55%' \ --preview '~/misc/tmux-window-preview {2}' \ --accept-nth 2 ) case "${sel}" in '') ;; *:*) tmux switch-client -t "${sel}" ;; *) tmux select-window -t ":${sel}" ;; esac exit 0