From d8d2f44fff0629d1d788ae465fe4ee788e8b3feb Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 22 Jun 2004 10:03:03 +0000 Subject: [PATCH] Set TMOUT depending on tty type. --- .zshenv | 1 - .zshrc | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.zshenv b/.zshenv index fcd4073..d34567b 100644 --- a/.zshenv +++ b/.zshenv @@ -24,7 +24,6 @@ SAVEHIST=100 HISTSIZE=$SAVEHIST HISTFILE=~/.zhistory REPORTTIME=1 -TMOUT=0 export PGPPATH=~/.pgp export PARINIT=q1 export PARBODY=_A_a diff --git a/.zshrc b/.zshrc index e34afbb..9c7153a 100644 --- a/.zshrc +++ b/.zshrc @@ -54,4 +54,13 @@ cls() { clear; true } source ~/.znewterm -TMOUT=3600 +# assume pseudo terminals are from a "safe" terminal +# other terminals are probably from a console and should +# auto-logout after some time. +case `tty` in +/dev/pts/*) + TMOUT=0 + ;; +*) + TMOUT=3600 +esac