Smoothly decreases the brightness using brightnessctl
- Brightnessctl
$ bash smoothDim [bright/dim] [number to stop dimming (optional)]
Edit the speed of the dimming by edting the sleep and brightnessctl values in the script
listener {
timeout = 250
on-timeout = bash ~/light.sh dim
on-resume = pkill -f ~/light.sh || bash ~/light.sh bright
}