Skip to content

Instantly share code, notes, and snippets.

@baldwindavid
Created October 26, 2025 18:37
Show Gist options
  • Save baldwindavid/5cf59f0a6625e26a7cf976540ab846f5 to your computer and use it in GitHub Desktop.
Save baldwindavid/5cf59f0a6625e26a7cf976540ab846f5 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Generic wrapper to run any command in a zellij floating pane
# Usage: run_in_zellij_floating.sh <command> [args...]
HELIX_CWD="$(pwd)"
# Build the full command to run
full_command="$@"
# Use zellij to create a large centered floating pane (90% width/height, centered at 5%/5%)
# --close-on-exit closes the pane immediately when the command exits
zellij action new-pane --floating --close-on-exit --width 90% --height 90% --x 5% --y 5% -- bash -c "cd '$HELIX_CWD' && $full_command"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment