#!/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