Lernstick / glados

The exam server webinterface
https://glados-doc.readthedocs.io/en/latest/
Other
8 stars 4 forks source link

Setting to adjust/lock screen brightness #21

Closed chaoos closed 6 years ago

chaoos commented 6 years ago
#!/bin/bash

ratio=$1
max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
brightness=$(printf "%.0f\n" $(echo "scale=2; (${ratio}/100)*${max}" | bc))

while true; do

  echo ${brightness} >/sys/class/backlight/intel_backlight/brightness
  inotifywait /sys/class/backlight/intel_backlight/brightness

done