Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an attempt of adding tmux as a supported output format to i3status.
tmux is a terminal multiplexer that combines multiple panes and screens with a configurable status bar, where i3status can be easily integrated by specifying the following line in tmux.conf:
For an unmodified i3status, this already works as expected with the output_format set to 'none'. This PR adds 'tmux' as an additional option for output_format to enable more sophisticated output, such as colors.
tmux allows color codes in the status output in the following format:
and it is possible to reset all formatting using:
There is one curveball, and that is that tmux requires all color hex codes to be lowercase because
#F
is a reserved identifier, so the following will not work as a valid color:instead, it needs to be:
This PR addresses this behavior specifically for the tmux output_format. Everything else is very straightforward.