From: Simon Ruderich Date: Sat, 7 May 2011 13:40:52 +0000 (+0200) Subject: screenrc: Lock screen after 10 minutes of inactivity for root. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=fa98a6e9ebafc93de71cd836a816bdec029bf72f;p=config%2Fdotfiles.git screenrc: Lock screen after 10 minutes of inactivity for root. Also update setup.sh to remove the option for non-root users. --- diff --git a/screenrc.in b/screenrc.in index 37d61da..ae27843 100644 --- a/screenrc.in +++ b/screenrc.in @@ -3,7 +3,13 @@ # Features which are only available in (very) recent screen releases or in # current Git are marked with "(GIT)" so they can be removed by the setup # script on machines with older versions. +# +# (BATTERY) is only used on laptops, (ROOT) only if running as root. + +# Automatically lock the screen after 10 minutes of inactivity if running as +# root. +idle 600 lockscreen # (ROOT) # Don't display startup message. startup_message off diff --git a/setup.sh b/setup.sh index 761e4bc..e9727dc 100755 --- a/setup.sh +++ b/setup.sh @@ -19,6 +19,13 @@ if [ $hostname != asp -a $hostname != systemofadown ]; then s/screen-256color/screen/' screenrc > screenrc.tmp mv screenrc.tmp screenrc fi +# Some options are only necessary when running as root. They are marked as +# "(ROOT)". +if [ x`id -u` != x0 ]; then + echo screenrc: removing root options + grep -v '(ROOT)' screenrc > screenrc.tmp + mv screenrc.tmp screenrc +fi # I use some features of screen which are only in Git. Drop them on machines # which have older versions. They are marked as "(GIT)". if [ $hostname != asp ]; then