Tmux session_last_attached
While working on my session finder, I tought it would be a good idea to list sessions sorted by the last time they were attached.
Tmux has a lot of useful variables for the sessions.
For example, there is the session_created
variable, which is replaced by the epoch time of when this session was created.
But there is no variable to find out the time that this session was last attached.
I added that and submited a patch for it.
Now I can list my sessions sorted by the time when they were last attached:
$ tmux list-sessions -F '#{session_last_attached} #{session_name}' | sort -r
1443039967 blog
1443039956 tmux
1443038611 rails
1443037501 vpn
1443033972 qrencode
1443033969 bender
1443032734 appa
1443013476 today
1443013473 go
1443005180 winterfell
1442995390 chrome-ext
1442941713 linode
1442868891 mp5
1442772955 evc
1442726644 octave
1442567980 fzf
I submited a couple of other patches as well. I use Tmux all the time, I’m glad I could contribute something back to it.