#!/bin/bash

BRIGHTNESS_LEVEL="${1:-}"

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

echo "Setting screen brightness to: $BRIGHTNESS_LEVEL"

xrandr --output eDP --brightness "$BRIGHTNESS_LEVEL"
