tmux
tmux copied to clipboard
Configurable time and date visibility
Hello,
I use your theme everywhere I can : i3, JetBrains and tmux. So it's time to contribute to one of the configuration. :slightly_smiling_face:
As I put my date and time in my i3 bar, I don't want to have it in my tmux.
I propose this patch to add some configuration in order to only have date, time or both displayed and keep a clean look. Both is the default to get some backward compatibility.
Here are some screen for the different possible configuration.
variation | patched font enabled | non patched font |
---|---|---|
time and date | ![]() |
![]() |
time only | ![]() |
![]() |
date only | ![]() |
![]() |
none | ![]() |
![]() |
Colors may look darker because my background is dark and my terminal background is transparent.
I refactored a bit for the NORD_TMUX_STATUS_DATE_FORMAT
to prevent too many deep if
s and set my two new variables the same way.
I made an attempt on my machine to get a neater status-right
value but it didn't worked so I ended up doing like so but if anyone has better to propose, I'll be happy to make some changes. As you can see I was forced to explode the different #[fg=...,bg=...]
into multiple #[fg=...]#[bg=...]...
otherwise it didn't work.
A last thing that I didn't understood is that you put tmux set-environment -gu NORD_TMUX_STATUS_TIME
and same for date and everything works as expected, we can change the option, reload configuration and changes is made.
I tried to add my two new variables but in this case they are always considered as 0
so nothing is displayed. Again, if anyone can give me the answer, I'll be happy to learn.
Thank you!