#!/bin/bash

BRIGHTNESS_LEVEL="${1:-}"

if [ -z "$BRIGHTNESS_LEVEL" ]; then
  BRIGHTNESS_LEVEL=2
  echo "No brightness level provided. Setting brightness to: $BRIGHTNESS_LEVEL"
fi

echo "Setting keyboard brightness to: $BRIGHTNESS_LEVEL"

echo "$BRIGHTNESS_LEVEL" | sudo tee /sys/class/leds/tpacpi::kbd_backlight/brightness

