$TTYIDLE  –  TTY idle time

$TTYIDLE contains the idle time of the associated TTY in seconds if there’s a TTY available.

Examples

Print TTY and idle time
1
2
3
echo $TTY
sleep 5
echo TTY idle time: ${TTYIDLE}s
Output:
1
2
/dev/pts/3
TTY idle time: 5s
BashSupport Pro is a Zsh IDE with support for $TTYIDLEtry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal