tmux-plugins / tmux-continuum

Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.
MIT License
3.31k stars 149 forks source link

Add last save timestamp in status #123

Closed sankhesh closed 1 year ago

bruno- commented 1 year ago

I'd rather not change the existing feature. Maybe we can have this as a separate status, for example #{continuum_timestamp}.

sankhesh commented 1 year ago

@bruno- How about the new change? It won't break/change anything for existing configurations but adds the timestamp when the new option is set.

bruno- commented 1 year ago

Hi, someone will want to have a timestamp without the status.

I must say I'm not a fan of adding more options, but on the other hand, if we're going to add a timestamp then people will want different time formats so we have to have @continuum-timestamp-format.

After thinking about all this, I think this feature should be extracted to a separate plugin. I know that's probably more work for you, but I won't use this feature and I don't want to maintain it for the years to come.

Also, I'll deprecate continuum_status feature, and extract it to a separate plugin.

sankhesh commented 1 year ago

Ok

j-rahman commented 1 year ago

Can I do this right now with some modifications to my .tmux.conf? If yes, could you please show how? Thanks.

sankhesh commented 1 year ago

@j-rahman If you navigate to the tmux-continuum directory in your tmux/plugins directory, you should be able to pull my branch and get these changes.

$ cd ~/.tmux/plugins/tmux-continuum
$ git fetch https://github.com/sankhesh/tmux-continuum timestamp_status
$ git checkout -b timestamp_status FETCH_HEAD

After that, you can enable the timestamp by adding the following to your tmux.conf

set -g @continuum-timestamp 'on' # show last session saved timestamp in the status