Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable time and date visibility #75

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

flohw
Copy link

@flohw flohw commented Dec 29, 2022

Hello,

I use your theme everywhere I can : i3, JetBrains and tmux. So it's time to contribute to one of the configuration. 馃檪

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 both enabled with patched font both enabled without patched font
time only time only with patched font time only without patched font
date only date only with patched font date only without patched font
none none with patched font none without patched font

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 ifs 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!

@svengreb svengreb self-requested a review as a code owner April 10, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant