mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-14 12:17:17 +00:00
17 lines
361 B
Bash
17 lines
361 B
Bash
# Set automatic timeout for shell
|
|
# which will automatically log out the user after certain amount of time
|
|
|
|
# This will only be applied for non-graphical sessions,
|
|
# or whenever root account is logged in
|
|
|
|
TMOUT=600
|
|
readonly TMOUT
|
|
|
|
[ -z "$DISPLAY" ] && export TMOUT;
|
|
|
|
case $(/usr/bin/tty) in
|
|
/dev/tty[0-9]*) export TMOUT;;
|
|
esac
|
|
|
|
[ $UID -eq 0 ] && export TMOUT;
|