forked from sayan01/scripts
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdim
More file actions
executable file
·17 lines (13 loc) · 439 Bytes
/
dim
File metadata and controls
executable file
·17 lines (13 loc) · 439 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# lowers screen brightness, then waits to be killed
# and restores previous brightness on exit.
min_brightness=0
fade_time=200
fade_steps=20
###############################################################################
cb=$(xbacklight -get)
trap 'exit 0' TERM INT
trap 'xbacklight -set $cb' EXIT
xbacklight -time $fade_time -steps $fade_steps -set $min_brightness
notify-send "Locking Screen due to Inactivity"
sleep inf