light 242 B

1234567891011121314
  1. #!/bin/rc
  2. #master file is /sys/src/cmd/bitsy/light.rc
  3. switch($1){
  4. case on
  5. echo -n 2 1 0x80 > /dev/backlight
  6. case off
  7. echo -n 2 0 0x80 > /dev/backlight
  8. case auto
  9. echo -n 1 1 0x80 > /dev/backlight
  10. case *
  11. echo -n 2 1 $1 > /dev/backlight
  12. }