Attach to tmux session with Kitty terminal

Prerequisites:

  1. Install Kitty
  2. Add kitty to PATH: sudo ln -s /Applications/kitty.app/Contents/MacOS/kitty /usr/local/bin/kitty (assuming /usr/local/bin is in your PATH)
  3. Kit: Sync $PATH from Terminal to Kit.app
CleanShot 2023-08-08 at 11 02 41@2x

Open tmux-sesh in Script Kit

// Name: tmux sesh
// Description: Attach to a tmux session
// Author: Lazar Nikolov
// Twitter: @NikolovLazar
import '@johnlindquist/kit';
const sessionsCmd = await $`tmux list-sessions`;
let sessions = sessionsCmd.stdout
.split('\n')
.map((line) => line.split(':')[0])
.filter((sesh) => !!sesh);
let choice = await arg('Attach to session:', sessions);
await $`kitty --hold sh -c "tmux a -t ${choice}"`;