hughbien / thyme

Pomodoro timer for tmux

Home Page:https://hughbien.com/thyme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use with non-1 `status-interval`?

h0adp0re opened this issue · comments

I can't seem to use thyme perfectly with a status-interval of 10. Sometimes the timer appears right away, sometimes after a few seconds. The same with stopping the timer. Naturally, this is because the statusbar is updated every 10 seconds. I have tried the following workarounds in my keybinds, none seem to work.

bind-key a run-shell "thyme" \; refresh-client -S
bind-key A run-shell "thyme -s" \; refresh-client -S

###

bind-key a run-shell "    \
  thyme;                  \
  sleep 0.5;              \
  tmux refresh-client -S; \
"
bind-key A run-shell "    \
  thyme -s;               \
  sleep 0.5;              \
  tmux refresh-client -S; \
"

I think I fixed it. This seems to work:

bind-key a run-shell "    \
  thyme;                  \
  sleep 1;                \
  tmux refresh-client -S; \
"
bind-key A run-shell "    \
  thyme -s;               \
  sleep 1;                \
  tmux refresh-client -S; \
"

Feel free to close this if you think this is a sufficient workaround/solution.