Crates.io | tmux-time-tracker |
lib.rs | tmux-time-tracker |
version | 0.1.3 |
source | src |
created_at | 2023-05-07 12:48:28.367486 |
updated_at | 2023-05-07 16:48:34.907561 |
description | Tracks the time spent attached to tmux session |
homepage | |
repository | |
max_upload_size | |
id | 859135 |
size | 59,074 |
A utility based on tmux hooks in order to track time attached to each session
cargo build --release
3 .Move ./target/release/tmux-time-tracker
into you $PATHset-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