It works by monitoring /sys/class/backlight/amdgpu_bl0/brightness for changes with inotify and creating an black overlay with an opacity based on the current ...