$ show alexwforsythe/tmux-which-key
tmux-which-key is a tmux plugin that provides a customizable popup menu for executing tmux commands and user-defined macros. The plugin architecture centers around a YAML configuration file that defines menu structure, keybindings, and macros, which is processed by a Python build script to generate tmux initialization code. At runtime, the plugin uses tmux's display-menu command to show nested menus and executes commands via command-aliases for performance. The plugin supports XDG directory compliance for immutable systems like NixOS and offers both YAML-based configuration (requiring Python) and direct tmux script editing alternatives. Key features include transient menus (that stay open for repeated commands), user macros (chained commands), and integration with TPM for plugin management.
The LLM identified 2 files worth highlighting for reuse:
Generates tmux configuration from YAML, handling nested menus, macros, and keybinding isolation. Self-contained with only PyYAML dependency, demonstrating clean separation of configuration and code generation logic. Reusable for any tmux configuration generation task.
Standalone shell script providing which-key functionality without Python dependencies. Uses tmux's display-menu command and recursive invocation for nested menus. Illustrates a dependency-free approach to tmux menu systems, reusable in any tmux configuration.