voidrice/.local/bin/nightlight
Kelly Roberts c330624dec
Update nightlight
use `ifinstalled` to check for `xsct`
2022-09-01 05:06:40 +00:00

14 lines
279 B
Bash
Executable File

#!/bin/sh
# toggle for a "nightlight" color temperature
# requires xsct
ifinstalled "xsct" || exit
colortemp="$(xsct | cut -d' ' -f5)"
if [ "$colortemp" -ge "6500" ]; then
xsct 2700 && notify-send "🌙 Night Light On"
else
xsct 0 && notify-send "☀️ Night Light Off"
fi