add nightlight script and dmenublocks action

This commit is contained in:
Kelly Roberts 2022-08-31 09:30:15 -07:00
parent 3e8c05fe3d
commit 4dbcc84076
No known key found for this signature in database
GPG Key ID: DE0702E8A90CB0EB
2 changed files with 13 additions and 0 deletions

12
.local/bin/nightlight Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# toggle for a "nightlight" color temperature
# requires xsct
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

View File

@ -4,6 +4,7 @@
# to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.).
case $BLOCK_BUTTON in
1) nightlight ;;
3) notify-send "🔋 Battery module" "🔋: discharging
🛑: not charging
♻: stagnant charge