summaryrefslogtreecommitdiff
path: root/scripts/.local/bin/bluelight
blob: 1aa16a8477c9fba54482d2aee0c5c497bf8f76c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# Obtains the current coordinates
COORDINATES=$(curl -s "https://location.services.mozilla.com/v1/geolocate?key=geoclue" | awk 'OFS=":" {print $3,$5}' | tr -d ',}')

#This is a script to turn on bluelight filter
if pgrep redshift > /dev/null
then
	killall redshift
else
	redshift -l "$COORDINATES" -m randr
fi