Skip to content

Commit 045b177

Browse files
committed
added screen suspend to suspend workstation after amount of idle time
1 parent 7603bab commit 045b177

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ install:
44
mkdir -p ${DESTDIR}${PREFIX}/bin
55
cp -f screen-dim ${DESTDIR}${PREFIX}/bin
66
cp -f screen-lock ${DESTDIR}${PREFIX}/bin
7+
cp -f screen-suspend ${DESTDIR}${PREFIX}/bin
78

89
uninstall:
910
rm -f ${DESTDIR}${PREFIX}/bin/screen-dim
1011
rm -f ${DESTDIR}${PREFIX}/bin/screen-lock
12+
rm -f ${DESTDIR}${PREFIX}/bin/screen-suspend
1113

screen-suspend

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
if [ $(xssstate -s) = "on" ];
4+
then
5+
_idle=$(($(xssstate -i) / 1000))
6+
if [ $_idle -gt 600 ];
7+
then
8+
sudo zzz
9+
fi
10+
fi
11+

0 commit comments

Comments
 (0)