"description": "⚡️ A tmux plugin giving you a hackable status bar consisting of dynamic & beautiful looking powerline segments, written purely in bash.",
tmux-powerline is a tmux tpm plugin that gives you a slick and hackable powerline status bar consisting of segments. It’s easily extensible with custom segments and themes.
The plugin itself is implemented purely in bash, thus minimizing system requirements. However, you can make segments in any language you want (with a shell wrapper).
Some examples of segments available that you can add to your tmux status bar are (full list here):
LAN & WAN IP addresses
Now Playing for MPD, Spotify (GNU/Linux native or wine, macOS), iTunes (macOS), Rhythmbox, Banshee, MOC, Audacious, Rdio (macOS), cmus, Pithos and Last.fm (last scrobbled track).
New mail count for GMail, Maildir, mbox, mailcheck, and Apple Mail
[!NOTE]
Note that tpm plugins should be at the bottom of your tmux.conf. This plugin will then override some tmux settings like status-left, status-right, etc. If you had already set those in your tmux config, it is a good opportunity to remove or comment them out.
Take a look at main.tmux for exactly which settings are overridden.
The theme is specified by setting the environment variable $TMUX_POWERLINE_THEME in the config file above. It will use a default theme, and you probably want to use your own. The default config has set the custom theme path to be ~/.config/tmux-powerline/themes/.
Make a copy of the default theme and make your own, say my-theme:
Some segments might not work on your system for various reasons, such as missing programs or different versions not having the same options. To find out which segment is not working, it may help to enable the debug setting in ~/.config/tmux-powerline/config.sh.
Next step would be to enable the error logging in general or even with a scope, see TMUX_POWERLINE_ERROR_LOGS_ENABLED and TMUX_POWERLINE_ERROR_LOGS_SCOPES in your config.
However, this may not be enough to determine the error, so you can inspect all executed bash commands (will be a long output) by doing
Terminal window
bash-xpowerline.sh (left|right)
To debug smaller portions of code, say if you think the problem lies in a specific segment, insert these lines at the top and bottom of the relevant code portions e.g., inside a function:
Terminal window
set-x
exec2>/tmp/tmux-powerline.log
<codetodebug>
set+x
and then inspect the outputs like
Terminal window
less/tmp/tmux-powerline.log
tail-f/tmp/tmux-powerline.log# or follow output like this.
You can also enable the debug mode in your config file. Look for the TMUX_POWERLINE_DEBUG_MODE_ENABLED environment variable and set it to true.
If you can not solve the problems, you can post an issue and be sure to include relevant information about your system and script output (from bash -x) and/or screenshots if needed.
Be sure to search in the resolved issues section for similar problems you’re experiencing before posting.
You have edited ~/.tmux.conf, but no powerline is displayed. This might be because tmux is not aware of the changes, so you have to restart your tmux session or reload that file by typing this on the command line (or in tmux command mode with prefix :)
Terminal window
tmuxsource-file~/.tmux.conf
Multiple lines in bash or no powerline in Zsh using iTerm (macOS)
If your tmux looks like this, then you may have to, in iTerm, uncheck [Unicode East Asian Ambiguous characters are wide] in Preferences -> Settings -> Advanced.
You can fork this project and then start coding right away with GitHub Codespaces, as this project is set up to install all development dependencies and install tmux-powerline on the devcontainer. See [devcontainer.json]!(.devcontainer/devcontainer.json) and [devcontainer_postCreateCommand.sh]!(scripts/devcontainer_postCreateCommand.sh). After starting the devcontainer, just type tmux in the terminal, and you should see a working tmux-powerline already to start playing with.
[!IMPORTANT]
If you have set up your own dotfiles to be installed with GitHub Codespaces, and there were some tmux config files installed from your dotfiles to the devcontainer, then you might have to run this script to wipe your config in favour of the setup provided by this repo’s initialization: