mirror of
https://github.com/zoriya/dotfiles.git
synced 2026-06-01 10:35:51 +00:00
Redshift: Configuring redshift
This commit is contained in:
@@ -3,20 +3,19 @@
|
||||
pid=$(pidof redshift)
|
||||
|
||||
case $BUTTON in
|
||||
1)
|
||||
redshift -x
|
||||
if [ ! "$pid" = "" ]; then
|
||||
kill -9 $pid
|
||||
redshift -x
|
||||
pid=""
|
||||
else
|
||||
redshift -r -l "$LATLONG" > /dev/null 2> /dev/null &
|
||||
pid="1"
|
||||
fi;;
|
||||
1)
|
||||
if [ ! "$pid" = "" ]; then
|
||||
kill -9 $pid
|
||||
redshift -x > /dev/null 2> /dev/null &
|
||||
pid=""
|
||||
else
|
||||
redshift -l $(curl -s "https://location.services.mozilla.com/v1/geolocate?key=geoclue" | awk 'OFS=":" {print $3,$5}' | tr -d ',}') > /dev/null 2> /dev/null &
|
||||
pid="1"
|
||||
fi;;
|
||||
esac
|
||||
|
||||
if [ "$pid" = "" ]; then
|
||||
echo "^c#ebcb8b^^d^"
|
||||
echo "^c#ebcb8b^^d^"
|
||||
else
|
||||
echo "^c#ebcb8b^^d^"
|
||||
echo "^c#ebcb8b^^d^"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user