You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
494 B
27 lines
494 B
5 years ago
|
#!/usr/bin/env bash
|
||
7 years ago
|
|
||
|
main() {
|
||
|
: "${BRIGHTNESS_DAY:=100}"
|
||
|
: "${BRIGHTNESS_TRANSITION:=50}"
|
||
|
: "${BRIGHTNESS_NIGHT:=20}"
|
||
|
: "${FADE_TIME:=60000}"
|
||
|
|
||
|
if [[ "${1}" != period-changed ]]; then
|
||
|
return
|
||
|
fi
|
||
|
|
||
|
case "${3}" in
|
||
|
night)
|
||
|
xbacklight -set "${BRIGHTNESS_NIGHT}" -time "${FADE_TIME}"
|
||
|
;;
|
||
|
transition)
|
||
|
xbacklight -set "${BRIGHTNESS_TRANSITION}" -time "${FADE_TIME}"
|
||
|
;;
|
||
|
daytime)
|
||
|
xbacklight -set "${BRIGHTNESS_DAY}" -time "${FADE_TIME}"
|
||
|
;;
|
||
|
esac
|
||
|
}
|
||
|
|
||
|
main "$@"
|