/tmux-split-statusbar

tmux plugin for splitting status bar into 2 parts - window + left/right status

Primary LanguageShell

Tmux Plugin -split status bar

This is an plugin that split stats bar into 2 parts (lines)

window part - First line

status-left / status-right part - Second line

This plugin provides function to hide status-left / status-right as well, if you want to focus, pure silence environment.

This plugin is compatible with Tmux plugin manager(TPM)

This pllugin should work with any themes well.

Installation

Installation with Tmux Plugin Manager (recommended)

Notice:

Due to using the command set -ga status-left / status-right

And it would be better put "tmux-split-statusbar" config lines **AFTER** status style like setup !

Requirements:

Requirements 1 : Make sure set these config lines AFTER theme plugin

(keep this plugin at the very bottom of tmux.conf)

Better JUST before this line

run -b '~/.tmux/plugins/tpm/tpm'

Requirements 2 : tmux version 3.0 (or higher), bash.

Add plugin to the list of TPM plugins in .tmux.conf:

set -g @plugin 'charlietag/tmux-split-statusbar'

Hit prefix + I to fetch the plugin and source it.

Status bar should be splited now

Manual Installation

Clone the repo:

$ git clone https://github.com/charlietag/tmux-split-statusbar.git ~/clone/path

Add this line to the bottom of .tmux.conf:

run-shell ~/clone/path/tmux-split-statusbar.tmux

Reload TMUX environment:

# type this in terminal
$ tmux source-file ~/.tmux.conf

Status bar should be splited now

Examples

Status bar splited (on): double lines
split-statusbar-mode-on

Status bar splited (off): single line
split-statusbar-mode-off

Status bar hide (on)
split-statusbar-hide-on

Status bar hide (off)
split-statusbar-hide-off

Customization

Here are all available options with their default values:

@split-statusbar-mode 'on'           # [ on | off]

@split-statusbar-swap-lines 'off'    # [ on | off ]
                                     # Enable this option to swap rows,
                                     # may be useful for those who prefer a status bar on top:
                                     # set -g status-position top

@split-statusbar-bindkey '-n F11'    # [ M-s | -n F11 | ... ]
                                     # bindkey for toggle statusbar-mode
                                     # define yourself just like bind-key, default: M-s

@split-status-hide-bindkey '-n F12'  # [ M-d | -n F12 | ... ]
                                     # bindkey for status-left / status-right hiding
                                     # define yourself just like bind-key, default: M-d

Don't forget to reload tmux environment ($ tmux source-file ~/.tmux.conf) after you do this.

Usage

Sample config in ~/.tmux.conf

set -g @plugin 'charlietag/tmux-split-statusbar'
set -g @split-statusbar-mode 'on'                 # [ on | off]

set -g @split-statusbar-swap-lines 'off'          # [ on | off]

set -g @split-statusbar-bindkey '-n F11'          # [ M-s | -n F11 | ... ]
                                                  # bindkey for toggle statusbar-mode
                                                  # define yourself just like bind-key, default: M-s

set -g @split-status-hide-bindkey '-n F12'        # [ M-d | -n F12 | ... ]
                                                  # bindkey for status-left / status-right hiding
                                                  # define yourself just like bind-key, default: M-d

Also read

  • .tmux.conf - Tmux configuration sample by CharlieTag

Other goodies

  • tmux-themes - simple colorful theme made by CharlieTag

License

MIT license

Change Log