{"id":31628174,"url":"https://github.com/49115566/tmux-persistent-prefix","last_synced_at":"2026-04-10T06:51:10.668Z","repository":{"id":318104956,"uuid":"1070010921","full_name":"49115566/tmux-persistent-prefix","owner":"49115566","description":"Toggle-able persistent prefix mode for tmux - execute multiple commands without repeatedly pressing Ctrl+b","archived":false,"fork":false,"pushed_at":"2025-10-05T04:55:00.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T06:15:25.254Z","etag":null,"topics":["bash","keybindings","linux","macos","productivity","shell","terminal","tmux","unix","workflow"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/49115566.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T04:31:40.000Z","updated_at":"2025-10-05T04:55:51.000Z","dependencies_parsed_at":"2025-10-05T06:15:29.731Z","dependency_job_id":"fbd00ab7-0f42-453d-af59-0571c5c8e81e","html_url":"https://github.com/49115566/tmux-persistent-prefix","commit_stats":null,"previous_names":["49115566/tmux-persistent-prefix"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/49115566/tmux-persistent-prefix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/49115566%2Ftmux-persistent-prefix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/49115566%2Ftmux-persistent-prefix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/49115566%2Ftmux-persistent-prefix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/49115566%2Ftmux-persistent-prefix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/49115566","download_url":"https://codeload.github.com/49115566/tmux-persistent-prefix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/49115566%2Ftmux-persistent-prefix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278672146,"owners_count":26025847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","keybindings","linux","macos","productivity","shell","terminal","tmux","unix","workflow"],"created_at":"2025-10-06T20:19:16.518Z","updated_at":"2025-10-06T20:19:18.318Z","avatar_url":"https://github.com/49115566.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tmux Persistent Prefix Mode\n\nA tmux configuration that adds a **toggle-able persistent prefix mode**, eliminating the need to repeatedly press `Ctrl+b` before each command. When activated, you can execute multiple tmux commands in succession without pressing the prefix key each time.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![tmux](https://img.shields.io/badge/tmux-2.9%2B-green.svg)](https://github.com/tmux/tmux)\n\n## 🎯 What Problem Does This Solve?\n\nWhen working with tmux, you normally need to press `Ctrl+b` before every command:\n```\nCtrl+b c    (create window)\nCtrl+b %    (split pane)\nCtrl+b n    (next window)\nCtrl+b o    (next pane)\n```\n\nWith persistent prefix mode, you press `Ctrl+b` once to enter the mode, then execute commands freely:\n```\nCtrl+b Ctrl+p    (enter persistent mode)\nc                (create window)\n%                (split pane)\nn                (next window)\no                (next pane)\nCtrl+p           (exit persistent mode)\n```\n\n## ✨ Features\n\n- **Toggle-able persistent mode** - Not just sticky keys, but a true modal interface\n- **Visual feedback** - Status bar turns orange with keyboard emoji when active\n- **Error resilient** - Commands that fail don't break persistent mode\n- **Full keybinding support** - All 70+ default tmux commands work\n- **Smart modal handling** - Copy mode and other modal commands work naturally\n- **Easy installation** - Smart installer preserves existing configurations\n- **Configurable activation key** - Choose your preferred keybinding\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\ngit clone https://github.com/YOUR_USERNAME/tmux-persistent-prefix.git\ncd tmux-persistent-prefix\n./install.sh\n```\n\nThe installer will:\n- ✓ Backup your existing tmux configuration\n- ✓ Check for keybinding conflicts\n- ✓ Install persistent prefix mode\n- ✓ Preserve your custom settings\n\n### Usage\n\n1. **Activate:** Press `Ctrl+b` then `Ctrl+p`\n2. **Status bar turns orange** with \"⌨ PERSISTENT MODE ⌨\"\n3. **Use any tmux command** without `Ctrl+b`: `c`, `n`, `%`, `\"`, `o`, arrows, etc.\n4. **Deactivate:** Press `Ctrl+p` or `Escape`\n\n### Example: Creating a Multi-Pane Layout\n\n**Before (5 key combinations):**\n```\nCtrl+b %    Ctrl+b \"    Ctrl+b o    Ctrl+b \"    Ctrl+b o\n```\n\n**After (1 activation + 5 simple keys + 1 deactivation):**\n```\nCtrl+b Ctrl+p    %    \"    o    \"  o  Escape (or Ctrl+p)\n```\n\n## 📖 Documentation\n\n- [Installation Guide](docs/INSTALLATION.md)\n- [FAQ](docs/FAQ.md)\n\n## 🎮 Commands Reference\n\n### Commands that STAY in Persistent Mode\n\nMost commands keep you in persistent mode:\n- **Windows:** `c`, `n`, `p`, `l`, `0-9`, `\u0026`, `,`, `.`\n- **Panes:** `%`, `\"`, `o`, `;`, `z`, `x`, `!`, `{`, `}`\n- **Navigation:** Arrow keys, `M-arrows`, `C-arrows`\n- **Layouts:** `Space`, `M-1` through `M-5`, `E`\n- **Other:** `i`, `r`, `m`, `M`, `]`, `~`, `\u003c`, `\u003e`\n\n### Commands that EXIT Persistent Mode (Modal)\n\nThese commands enter their own modes and intentionally exit persistent mode so their native keybindings work:\n- **`[`** - Copy mode (use `q` to quit, `Escape` to exit)\n- **`q`** - Display panes (use number keys to select)\n- **`s`** - Choose session tree\n- **`w`** - Choose window tree\n- **`t`** - Clock mode\n- **`C`** - Customize mode\n- **`D`** - Choose client\n\nAfter using a modal command, simply re-enter persistent mode with `Ctrl+b Ctrl+p`.\n\n## 🔧 Configuration\n\n### Change Activation Key\n\nEdit `~/.tmux.conf` and modify the activation binding:\n```tmux\n# Change C-p to your preferred key\nbind-key -T prefix C-p \\\n    set-environment -g TMUX_PERSISTENT_PREFIX 1 \\; \\\n    ...\n```\n\n### Customize Colors\n\n```tmux\n# Change status bar color when active\nset-option -g status-style \"bg=colour208,fg=black,bold\" \\; \\\n```\n\n## 🛠️ Requirements\n\n- tmux 2.9 or later\n- Bash (for installation scripts)\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📝 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\nCreated to solve the repetitive strain of pressing `Ctrl+b` constantly when working with complex tmux layouts.\n\n## 📊 Technical Details\n\n### How It Works\n\n1. Uses tmux's native **key table** feature for performance\n2. Custom `persistent-prefix` key table contains all command bindings\n3. Each binding executes and returns to the persistent table\n4. Environment variable tracks state\n5. Wrapper scripts handle errors gracefully\n6. Modal commands exit to their own key tables\n\n### Architecture\n\n```\nprefix table (Ctrl+b)\n    ↓\npersistent-prefix table (Ctrl+p to enter)\n    ↓\nCommands → exec-and-return.sh → Back to persistent-prefix\n    OR\nModal commands → exec-modal-exit.sh → Exit to normal mode\n```\n\n## 🐛 Known Issues\n\n- Some terminal emulators may not support all key combinations\n- Some commands don't function in persistent mode (e.g. Ctrl+b : doesn't work to my knowledge)\n- Modal commands exit persistent mode by design (this is a feature, not a bug!)\n\n## 📈 Roadmap\n\n- [ ] Dynamic command support (parses existing commands and saves them to a table rather than using a premade table)\n- [ ] Optional sound/visual notifications\n- [ ] Per-session persistent mode settings\n- [ ] Integration with tmux plugins\n- [ ] Integration wtih tmux itself??? (feel free to make an official integration of this!)\n\n## 💬 Support\n\n- 🐛 [Report a bug](https://github.com/49115566/tmux-persistent-prefix/issues)\n- 💡 [Request a feature](https://github.com/49115566/tmux-persistent-prefix/issues)\n- 📖 [Read the docs](docs/)\n\n---\n\n**Made with ❤️ for tmux users who are tired of Ctrl+b spam**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F49115566%2Ftmux-persistent-prefix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F49115566%2Ftmux-persistent-prefix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F49115566%2Ftmux-persistent-prefix/lists"}