better version with transition

This commit is contained in:
Kelly Roberts 2022-09-01 09:00:23 -07:00
parent c5bfdcba4c
commit cee6be0152
No known key found for this signature in database
GPG Key ID: DE0702E8A90CB0EB

View File

@ -1,13 +1,18 @@
#!/bin/sh #!/bin/sh
# toggle for a "nightlight" color temperature
# requires xsct # requires xsct
# toggle for a "nightlight" color temperature
# edit value of settemp to your desired color temperature (minimum is 700)
ifinstalled "xsct" || exit ifinstalled "xsct" || exit
settemp="2700"
colortemp="$(xsct | cut -d' ' -f5)" colortemp="$(xsct | cut -d' ' -f5)"
if [ "$colortemp" -ge "6500" ]; then if [ "$colortemp" -ge "6500" ]; then
xsct 2700 && notify-send "🌙 Night Light On" notify-send "🌙 Night Light Enabled (${settemp}K)"
for i in $(seq 6500 -100 ${settemp}); do xsct $i; sleep 0.1; done
else else
xsct 0 && notify-send "☀️ Night Light Off" notify-send "☀️ Night Light Disabled"
for i in $(seq ${settemp} 100 6500); do xsct $i; sleep 0.1; done
fi fi