18 lines
332 B
Bash
18 lines
332 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
brightness="$(light | sed 's/\.[0-9]*//g')"
|
||
|
|
||
|
if [ "$brightness" -gt "95" ]; then
|
||
|
echo "🌞"
|
||
|
elif [ "$brightness" -gt "75" ]; then
|
||
|
echo "🌕"
|
||
|
elif [ "$brightness" -gt "60" ]; then
|
||
|
echo "🌖"
|
||
|
elif [ "$brightness" -gt "45" ]; then
|
||
|
echo "🌗"
|
||
|
elif [ "$brightness" -gt "15" ]; then
|
||
|
echo "🌘"
|
||
|
else
|
||
|
echo "🌑"
|
||
|
fi
|