#tmux-session #time #track #attached #spent

bin+lib tmux-time-tracker

Tracks the time spent attached to tmux session

4 releases

0.1.3 May 7, 2023
0.1.2 May 7, 2023
0.1.1 May 7, 2023
0.1.0 May 7, 2023

#434 in Date and time

Download history 2/week @ 2024-02-28 5/week @ 2024-03-27 13/week @ 2024-04-03 40/week @ 2024-04-10

58 downloads per month


148 lines

A utility based on tmux hooks in order to track time attached to each session


  1. Clone the repository
  2. Run cargo build --release 3 .Move ./target/release/tmux-time-tracker into you $PATH
  3. Add the following to your tmux.conf:
    set-hook -g client-attached 'run-shell "output=$(tmux-time-tracker geth #{session_name}); tmux-time-tracker attach #{session_name}; tmux display-message \"Total time: \$output\""'
    set-hook -g client-detached 'run-shell "tmux-time-tracker detach"'
    set-hook client-session-changed 'run-shell "tmux-time-tracker detach; tmux-time-tracker attach #{session_name}; output=$(tmux-time-tracker geth #{session_name}); tmux display-message \"Total time: \$output\""'

WARNING: does not work correctly if you attach to the same tmux instance from multiple clients



A CLI program meant to hook into Tmux Allows for tracking the time spent attached to Tmux session


~1M SLoC