### Install GITMUX with TPM Source: https://github.com/0phoff/gitmux/blob/master/README.md Instructions for installing the GITMUX tmux plugin using the tmux plugin manager (TPM). This involves adding the plugin to your tmux configuration file. ```tmux set -g @plugin '0phoff/gitmux' ``` -------------------------------- ### Tmux Status Bar Configuration Example Source: https://github.com/0phoff/gitmux/blob/master/README.md An example of how to integrate GITMUX variables into the tmux status bar (`status-right`). This snippet demonstrates displaying git status indicators like untracked files, changed files, staged files, and branch information. ```tmux set -g status-right '#{?GITMUX_REPO,#[fg=red]#{GITMUX_UNTRACKED} #[fg=yellow]#{GITMUX_CHANGED} #[fg=green]●#{GITMUX_STAGED} #[fg=white] #[fg=green]↑#{GITMUX_COMMITS_AHEAD} #[fg=red]↓#{GITMUX_COMMITS_BEHIND} #[fg=white] ⎇ #{GITMUX_BRANCH} , }' ``` -------------------------------- ### Neovim Asynchronous GITMUX Update Source: https://github.com/0phoff/gitmux/blob/master/README.md Alternative configuration for Neovim that uses `jobstart` for asynchronous execution of the GITMUX update script. This prevents the editor from blocking during the update process. ```vimscript autocmd BufWritePost * silent! jobstart(['bash', '-c', 'eval $(tmux display -p "#{GITMUX_SCRIPT}")']) ``` -------------------------------- ### Bash PROMPT_COMMAND for GITMUX Source: https://github.com/0phoff/gitmux/blob/master/README.md Guidance on configuring the `PROMPT_COMMAND` variable in Bash to ensure GITMUX updates correctly. It emphasizes the correct format for appending commands to avoid overwriting existing `PROMPT_COMMAND`. ```bash PROMPT_COMMAND=" …your_functions_here… ;$PROMPT_COMMAND" ``` -------------------------------- ### GITMUX Environment Variables API Source: https://github.com/0phoff/gitmux/blob/master/README.md Lists and describes the environment variables provided by GITMUX, which contain information about the current git repository. These variables can be accessed within tmux to display git status. ```APIDOC GITMUX Environment Variables: __GITMUX_SCRIPT__: Description: Path to the update script. This is a global tmux variable. Access: Use `tmux showenv -g`. __GITMUX_REPO__: Description: Indicates if the current pane is within a git repository. Non-zero if inside a git repo. __GITMUX_BRANCH__: Description: Name of the current git branch. __GITMUX_REMOTE__: Description: Name of the tracking branch. Value is 0 if no tracking branch is set. __GITMUX_COMMITS_AHEAD__: Description: Number of commits the current branch is ahead of its remote tracking branch. __GITMUX_COMMITS_BEHIND__: Description: Number of commits the current branch is behind its remote tracking branch. __GITMUX_STAGED__: Description: Number of files staged for the next commit. __GITMUX_CHANGED__: Description: Number of files modified but not staged. __GITMUX_UNTRACKED__: Description: Number of untracked files in the repository. __GITMUX_STASHED__: Description: Number of stashes saved in the repository. __GITMUX_CONFLICTS__: Description: Number of files with merge conflicts. __GITMUX_CLEAN__: Description: Indicates if the repository is clean. Value is 1 if there are no untracked, changed, or staged files, no stashes, and no conflicts. ``` -------------------------------- ### Vim Integration for GITMUX Update Source: https://github.com/0phoff/gitmux/blob/master/README.md Configuration for Vim to automatically update the tmux status bar using GITMUX whenever a file is saved. This ensures the status bar reflects the latest git information. ```vimscript autocmd BufWritePost * silent! !eval $(tmux display -p "#{GITMUX_SCRIPT}") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.