{"id":26895184,"url":"https://github.com/thenameiswiiwin/tmux-sessionizer","last_synced_at":"2026-04-10T07:05:36.718Z","repository":{"id":285281467,"uuid":"952313117","full_name":"thenameiswiiwin/tmux-sessionizer","owner":"thenameiswiiwin","description":"Intelligent tmux session manager that automatically detects project types and creates optimized workspace layouts. Streamline your terminal workflow with fuzzy search, custom templates, and smart project detection.","archived":false,"fork":false,"pushed_at":"2025-03-30T19:02:08.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T20:19:05.802Z","etag":null,"topics":["automation","bash","cli-tool","developer-tools","development-environment","devops","dotfiles","fzf","neovim","productivity","project-management","session-manager","shell-script","terminal","terminal-multiplexer","terminal-workflow","tmux","vim","workflow","workspace-manager"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thenameiswiiwin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-21T04:38:45.000Z","updated_at":"2025-03-30T19:02:12.000Z","dependencies_parsed_at":"2025-03-30T20:29:10.998Z","dependency_job_id":null,"html_url":"https://github.com/thenameiswiiwin/tmux-sessionizer","commit_stats":null,"previous_names":["thenameiswiiwin/tmux-sessionizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenameiswiiwin%2Ftmux-sessionizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenameiswiiwin%2Ftmux-sessionizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenameiswiiwin%2Ftmux-sessionizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thenameiswiiwin%2Ftmux-sessionizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thenameiswiiwin","download_url":"https://codeload.github.com/thenameiswiiwin/tmux-sessionizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246569008,"owners_count":20798341,"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","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":["automation","bash","cli-tool","developer-tools","development-environment","devops","dotfiles","fzf","neovim","productivity","project-management","session-manager","shell-script","terminal","terminal-multiplexer","terminal-workflow","tmux","vim","workflow","workspace-manager"],"created_at":"2025-04-01T01:54:27.077Z","updated_at":"2026-04-10T07:05:36.712Z","avatar_url":"https://github.com/thenameiswiiwin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tmux-sessionizer\n\nA lightning-fast tmux session manager that simplifies project workflows with automatic environment configuration.\n\n## Overview\n\n`tmux-sessionizer` is a powerful Bash utility designed to streamline tmux workflow by:\n\n- Quickly switching between projects\n- Automatically creating consistent session layouts\n- Providing project-specific environment configuration\n- Eliminating repetitive setup tasks\n\nThe tool consists of two components:\n\n1. `tmux-sessionizer` - The main script for creating and switching sessions\n2. `.tmux-sessionizer` - A project-specific configuration script\n\n## Prerequisites\n\n- tmux 3.0+\n- Bash 4.0+ or Zsh\n- fzf (for interactive directory selection)\n- fd (optional, for faster directory scanning)\n\n## Installation\n\n### 1. Install tmux-sessionizer\n\n```bash\n# Create bin directory if it doesn't exist\nmkdir -p ~/.local/bin\n\n# Download the script\ncurl -o ~/.local/bin/tmux-sessionizer https://raw.githubusercontent.com/thenameiswiiwin/tmux-sessionizer/main/tmux-sessionizer\n\n# Make it executable\nchmod +x ~/.local/bin/tmux-sessionizer\n\n# Ensure ~/.local/bin is in your PATH\necho 'export PATH=\"$HOME/.local/bin:$PATH\"' \u003e\u003e ~/.zshrc  # or ~/.bashrc\n```\n\n### 2. Install .tmux-sessionizer\n\n```bash\n# Download the configuration script\ncurl -o ~/.tmux-sessionizer https://raw.githubusercontent.com/thenameiswiiwin/dev-env/develop/.tmux-sessionizer\n\n# Make it executable\nchmod +x ~/.tmux-sessionizer\n```\n\n### 3. Set up keyboard shortcut\n\nAdd to your `.zshrc` or `.bashrc`:\n\n```bash\n# Add Ctrl+f shortcut for tmux-sessionizer\nif command -v tmux-sessionizer \u0026\u003e/dev/null; then\n    bindkey -s \"^f\" \"tmux-sessionizer\\n\"  # Zsh\n    # OR\n    # bind -x '\"\\C-f\":\"tmux-sessionizer\"'  # Bash\nfi\n```\n\n## Basic Usage\n\n### Starting a Session\n\n- **Interactive**: Press `Ctrl+f` or run `tmux-sessionizer` with no arguments\n- **Direct path**: `tmux-sessionizer ~/dev/myproject`\n\n### During a Session\n\n- **Switch projects**: Press `prefix + f` (typically `Ctrl+a f`) within tmux\n- **Create windows**: Standard tmux commands after session is created\n\n## Session Creation Process\n\n1. **Directory Selection**: Choose a project directory\n2. **Session Creation**: Creates tmux session named after directory\n3. **Layout Configuration**: Automatically sets up project-specific windows\n4. **Environment Hydration**: Sources `.tmux-sessionizer` for custom setup\n\n## Project-Specific Configuration\n\nCreate a `.tmux-sessionizer` file in your project root for custom setup:\n\n```bash\n#!/usr/bin/env bash\n\n# Project-specific setup goes here\necho \"Setting up custom project environment...\"\n\n# Add commands to run in the session\n# Example: Starting development server in a window named \"server\"\nif tmux has-session -t \"$(tmux display-message -p '#S'):server\" 2\u003e/dev/null; then\n    tmux send-keys -t \"$(tmux display-message -p '#S'):server\" \"npm run dev\" C-m\nfi\n```\n\n## Project Type Detection\n\nThe `.tmux-sessionizer` script automatically detects project types and creates appropriate window layouts:\n\n| Project Type | Detection Method | Windows Created           |\n| ------------ | ---------------- | ------------------------- |\n| Node.js      | package.json     | edit, shell, server, test |\n| Go           | go.mod           | edit, shell, run, test    |\n| Rust         | Cargo.toml       | edit, shell, build, test  |\n| PHP          | composer.json    | edit, shell, server, test |\n| Python       | requirements.txt | edit, shell, run, test    |\n| Generic      | (fallback)       | edit, shell               |\n\n## Advanced Features\n\n### Window Management\n\nThe `.tmux-sessionizer` script provides several helper functions:\n\n- **window_exists**: Check if a window exists in a session\n- **create_window_if_missing**: Create a window if it doesn't exist\n- **send_command**: Send a command to a specific window\n\n### Custom Project Layouts\n\nYou can create project-specific layouts by modifying the `.tmux-sessionizer` file:\n\n```bash\n#!/usr/bin/env bash\n\n# Skip for home directory\nif [[ \"$PWD\" == \"$HOME\" ]]; then\n  return 0\nfi\n\n# Create a custom layout\nsession_name=$(tmux display-message -p '#S')\n\n# Create windows\ntmux new-window -t \"$session_name\" -n \"database\"\ntmux new-window -t \"$session_name\" -n \"logs\"\n\n# Set up commands\ntmux send-keys -t \"$session_name:database\" \"docker-compose up -d db\" C-m\ntmux send-keys -t \"$session_name:logs\" \"tail -f logs/development.log\" C-m\n\n# Return to edit window\ntmux select-window -t \"$session_name:edit\"\n```\n\n### Theme Integration\n\nThe `.tmux-sessionizer` script respects your tmux theme settings (dark/light mode). To toggle themes, press `prefix + T`.\n\n## Troubleshooting\n\n### Common Issues\n\n**Issue**: tmux-sessionizer not found\n**Solution**: Ensure ~/.local/bin is in your PATH and the script is executable\n\n**Issue**: Session not created\n**Solution**: Check for error messages during session creation\n\n**Issue**: Windows not being created\n**Solution**: Verify that tmux is properly installed and the session name is valid\n\n**Issue**: Custom configuration not being loaded\n**Solution**: Check that `.tmux-sessionizer` is executable and contains valid Bash syntax\n\n## Performance Optimization\n\nFor faster operation:\n\n1. Install `fd` for faster directory scanning\n2. Minimize file operations in your `.tmux-sessionizer` file\n3. Use efficient window creation patterns\n4. Avoid unnecessary commands in the script\n\n## Customization Examples\n\n### Custom Search Paths\n\nModify the `tmux-sessionizer` script to search different directories:\n\n```bash\n# Find in custom locations\nselected=$(find ~/work ~/clients ~/experiments -mindepth 1 -maxdepth 1 -type d | fzf)\n```\n\n### Project Types\n\nAdd support for additional project types in `.tmux-sessionizer`:\n\n```bash\n# Laravel project\nif [[ -f \"$git_root/artisan\" ]]; then\n  echo \"Setting up Laravel project environment\"\n  setup_project_windows \"$session_name\" \"$git_root\" \"shell\" \"artisan\" \"routes\" \"test\"\nfi\n```\n\n## Tips \u0026 Tricks\n\n1. **Fast Project Switching**: Use `Ctrl+f` outside tmux or `prefix + f` inside\n2. **Quick Command Execution**: Use tmux send-keys for automating common tasks\n3. **Multiple Monitors**: Create separate sessions for different displays\n4. **Session Persistence**: tmux sessions remain after disconnect; reattach later\n\n## Credits\n\n- Original concept by ThePrimeagen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenameiswiiwin%2Ftmux-sessionizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenameiswiiwin%2Ftmux-sessionizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenameiswiiwin%2Ftmux-sessionizer/lists"}