File tree 3 files changed +32
-0
lines changed
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ PREFIX ?= /usr/local
2
+
3
+ install :
4
+ mkdir -p ${DESTDIR}${PREFIX} /bin
5
+ cp -f screen-dim ${DESTDIR}${PREFIX} /bin
6
+ cp -f screen-lock ${DESTDIR}${PREFIX} /bin
7
+
8
+ uninstall :
9
+ rm -f ${DESTDIR}${PREFIX} /bin/screen-dim
10
+ rm -f ${DESTDIR}${PREFIX} /bin/screen-lock
11
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ get_brightness () {
4
+ xrandr --verbose | awk ' /Brightness/ { print $NF }'
5
+ }
6
+
7
+ set_brightness () {
8
+ xrandr --listactivemonitors| tail -n1 | awk ' { print $NF }' | xargs -i xrandr --output {} --brightness $1
9
+ }
10
+
11
+
12
+ trap ' exit 0' TERM INT
13
+ trap " set_brightness $( get_brightness) ; kill %%" EXIT
14
+ set_brightness 0.5
15
+ sleep 2147483647 &
16
+ wait
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ h=$( hostname)
4
+ slock -m " login $USER @$h "
5
+
You can’t perform that action at this time.
0 commit comments