Large update to upgrade script, remove unneccessary configs, add additional and fixups
This commit is contained in:
@ -4,25 +4,29 @@ if [[ $1 = "--toggle" ]] || [[ $1 = "-t" ]]; then
|
||||
if pgrep redshift >/dev/null; then
|
||||
pkill redshift
|
||||
else
|
||||
redshift &
|
||||
redshift-gtk &
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
icon=""
|
||||
pgrep -x redshift &> /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
temp=$(redshift -p 2>/dev/null | grep temp | cut -d' ' -f3)
|
||||
temp=${temp//K/}
|
||||
fi
|
||||
|
||||
if [[ -z $temp ]]; then
|
||||
echo " $icon " # Greyed out (not running)
|
||||
elif [[ $temp -ge 5000 ]]; then
|
||||
echo "%{F#8039A0} $icon " # Blue
|
||||
elif [[ $temp -ge 4000 ]]; then
|
||||
echo "%{F#F203F0} $icon " # Yellow
|
||||
else
|
||||
echo "%{F#FF5B6C} $icon " # Orange
|
||||
fi
|
||||
while true; do
|
||||
pgrep -x redshift &> /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
temp=$(redshift -p 2>/dev/null | grep temp | cut -d' ' -f3)
|
||||
temp=${temp//K/}
|
||||
fi
|
||||
|
||||
if [[ -z $temp ]]; then
|
||||
echo " $icon " # Greyed out (not running)
|
||||
elif [[ $temp -ge 5000 ]]; then
|
||||
echo "%{F#8039A0} $icon " # Blue
|
||||
elif [[ $temp -ge 4000 ]]; then
|
||||
echo "%{F#F203F0} $icon " # Yellow
|
||||
else
|
||||
echo "%{F#FF5B6C} $icon " # Orange
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user