Enables displaying username (whoami) and root status information in Tmux status-right
and status-left
.
Installation with Tmux Plugin Manager (recommended)
Add plugin to the list of TPM plugins in .tmux.conf
:
set -g @plugin 'Avyiel/tmux-uroot'
Hit prefix + I
to fetch the plugin and source it.
If format strings are added to status-right
, they should now be visible.
Clone the repo:
$ git clone https://github.com/tmux-plugins/tmux-uroot ~/clone/path
Add this line to the bottom of .tmux.conf
:
run-shell ~/clone/path/uroot.tmux
Reload TMUX environment:
# type this in terminal
$ tmux source-file ~/.tmux.conf
If format strings are added to status-right
, they should now be visible.
Add any of the supported format strings (see below) to the existing status-right
tmux option.
Example:
# in .tmux.conf
set -g status-right '#{username}#{root} | %a %h-%d %H:%M '
This plugins is really just porting part of gpakosz's .tmux, which is published under the WTFPLv2 and MIT licenses. I also borrowed the interpolation part of the plugin from the excelent tmux-plugins repository, which is also published under the MIT license.