A tmux theme inspired by CZ2128 Delta
A Tmux with the 256 colours feature.
Almost all Tmux probably fill the requirement, so we don't need to do extra something.
If a problem is happened, please try the following command to run Tmux or equivalent configurations to it.
tmux -2
Installation with Tmux Plugin Manager (recommended)
-
Add plugin to the list of TPM plugins in
.tmux.conf
set -g @plugin 'a5ob7r/tmux-cz'
-
Type
prefix + I
to fetch the plugin and source it.
-
Clone repository to local.
git clone https://github.com/a5ob7r/tmux-cz.git ~/clone/path
-
Add this line to
~/.tmux.conf
run-shell ~/clone/path/tmux-cz.tmux
-
Reload
~/.tmux.conf
tmux source-file ~/.tmux.conf
This theme provides some low-level options, which are not user-friendly and are probably hard for users to configure them.
Please see Configurations section at first instead of this section.
The colour of status line background.
The value must be one of valid colour values of Tmux.
See the STYLES
section in tmux(1)
for details.
By default,
set -g @TMUX_CZ_STATUS_BACKGROUND_COLOUR default
Colourful decorations in status-left / status-right.
A Tmux format string to construct a part of a colourful decoration in status-left.
The value must be a valid format string of Tmux.
See FORMATS
in tmux(1)
for details.
By default,
set -g @TMUX_CZ_STATUS_LEFT_DECORATION '#[reverse] #[noreverse]'
A Tmux format string to construct a part of a colourful decoration in status-right.
The value must be a valid format string of Tmux.
See FORMATS
in tmux(1)
for details.
By default,
set -g @TMUX_CZ_STATUS_RIGHT_DECORATION '#[reverse] #[noreverse]'
Status line element separators in status-left / status-right / window-status / window-status-current. They are inserted between two components which have different background colours.
By default,
set -g @TMUX_CZ_LEFT_SEPARATOR ''
By default,
set -g @TMUX_CZ_RIGHT_SEPARATOR ''
Status line element sub separators in status-left / status-right / window-status / window-status-current. They are inserted between two components which have the same background colour.
By default,
set -g @TMUX_CZ_LEFT_SUBSEPARATOR '|'
By default,
set -g @TMUX_CZ_RIGHT_SUBSEPARATOR '|'
These options define elements for each status line components as a virtual array user option of Tmux.
Tmux doesn't support to define user options with an array type.
Instead, this theme treats a collection of plain user options as an array user option using a variable name format convention.
The format is @PREFIX_NAME_INDEX
, a head of @
is a prefix to define Tmux user options.
This theme treats PREFIX_NAME
as a variable name of an array, and INDEX
is an index of an array.
The order of elements of an array is the alphabetical order of INDEX
s, which is depends on the output of the show-options
sub-command of Tmux.
The valid PREFIX
and valid NAME
s are below, but this theme treats any character sequences without spaces (
) as a valid INDEX
.
- PREFIX
- TMUX_CZ
- NAME
- WINDOW_STATUS_MAIN_ELEMENT
- WINDOW_STATUS_SUB_ELEMENT
- WINDOW_STATUS_CURRENT_MAIN_ELEMENT
- WINDOW_STATUS_CURRENT_SUB_ELEMENT
- STATUS_LEFT_ELEMENT
- STATUS_RIGHT_ELEMENT
If a variable name is @TMUX_CZ_WINDOW_STATUS_MAIN_ELEMENT_0
, PREFIX
is TMUX_CZ
, NAME
is WINDOW_STATUS_MAIN_ELEMENT
and INDEX
is 0
.
The special format @PREFIX_NAME_
with any value, which is no INDEX
, means the empty array.
Format strings to represent elements in the right hand side in window-status.
The value must be a valid format string of Tmux.
See FORMATS
in tmux(1)
for details.
By default,
set -g @TMUX_CZ_WINDOW_STATUS_MAIN_ELEMENT_0 ' #{window_name} '
Format strings to represent elements in the left hand side in window-status.
The value must be a valid format string of Tmux.
See FORMATS
in tmux(1)
for details.
By default,
set -g @TMUX_CZ_WINDOW_STATUS_SUB_ELEMENT_0 ' #{window_index}#{window_flags} '
Format strings to represent elements in the right hand side in window-status-current.
The value must be a valid format string of Tmux.
See FORMATS
in tmux(1)
for details.
By default,
set -g @TMUX_CZ_WINDOW_STATUS_CURRENT_MAIN_ELEMENT_0 ' #{window_name} '
Format strings to represent elements in the left hand side in window-status-current.
The value must be a valid format string of Tmux.
See FORMATS
in tmux(1)
for details.
By default,
set -g @TMUX_CZ_WINDOW_STATUS_CURRENT_SUB_ELEMENT_0 ' #{window_index}#{window_flags} '
Format strings to represent elements in status-left.
The value must be a valid format string of Tmux or one of constants of this theme.
See FORMATS
in tmux(1)
for details of format strings.
All of constants are below.
- TMUX_CZ_STATUS_LEFT_DECORATION
- The colourful decoration in status-left.
By default,
set -g @TMUX_CZ_STATUS_LEFT_ELEMENT_0 TMUX_CZ_STATUS_LEFT_DECORATION
set -g @TMUX_CZ_STATUS_LEFT_ELEMENT_1 ' #H [#S] '
Format strings to represent elements in status-right.
The value must be a valid format string of Tmux or one of constants of this theme.
See FORMATS
in tmux(1)
for details of format strings.
All of constants are below.
- TMUX_CZ_STATUS_RIGHT_DECORATION
- The colourful decoration in status-right.
By default,
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_0 ' %H:%M '
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_1 ' %Y-%m-%d(%a) '
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_2 TMUX_CZ_STATUS_RIGHT_DECORATION
This section provides some configuration examples.
To decorate this theme with Powerline Font,
set -g @TMUX_CZ_STATUS_LEFT_DECORATION
set -g @TMUX_CZ_STATUS_RIGHT_DECORATION
set -g @TMUX_CZ_LEFT_SEPARATOR
set -g @TMUX_CZ_RIGHT_SEPARATOR
set -g @TMUX_CZ_LEFT_SUBSEPARATOR
set -g @TMUX_CZ_RIGHT_SUBSEPARATOR
# OR
set -g @TMUX_CZ_STATUS_LEFT_DECORATION ' '
set -g @TMUX_CZ_STATUS_RIGHT_DECORATION ' '
set -g @TMUX_CZ_LEFT_SEPARATOR ' '
set -g @TMUX_CZ_RIGHT_SEPARATOR ' '
set -g @TMUX_CZ_LEFT_SUBSEPARATOR ' '
set -g @TMUX_CZ_RIGHT_SUBSEPARATOR ' '
To add foo
to the status-left component,
set -g @TMUX_CZ_STATUS_LEFT_ELEMENT_1 TMUX_CZ_STATUS_LEFT_DECORATION
set -g @TMUX_CZ_STATUS_LEFT_ELEMENT_2 ' #H [#S] '
set -g @TMUX_CZ_STATUS_LEFT_ELEMENT_3 ' foo '
Or add an element using tmux-battery,
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_0 ' #{battery_icon} #{battery_percentage} '
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_1 ' %H:%M '
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_2 ' %Y-%m-%d(%a) '
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_3 TMUX_CZ_STATUS_RIGHT_DECORATION
To remove the host name element,
set -g @TMUX_CZ_STATUS_LEFT_ELEMENT_0 TMUX_CZ_STATUS_LEFT_DECORATION
Or to remove the right decoration element,
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_0 ' %H:%M '
set -g @TMUX_CZ_STATUS_RIGHT_ELEMENT_1 ' %Y-%m-%d(%a) '
To hide each status line components completely,
# To hide status-left.
set -g @TMUX_CZ_STATUS_LEFT_ELEMENT_ ''
# To hide a main area of window-status-format.
set -g @TMUX_CZ_WINDOW_STATUS_MAIN_ELEMENT_ ''