Author Topic: redshift support  (Read 5130 times)

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
redshift support
« on: August 17, 2014, 11:41:11 am »
Do I need a login now to create trac tickets?

I wanted to put in a feature request for redshift. batches:
Code: [Select]
-374
4384
632
631

redshift.sh:
Code: [Select]
#!/bin/bash

. /usr/pluto/bin/Utils.sh

REDSHIFT=/usr/bin/redshift

while getopts ":d:" optname
do
  case "$optname" in
    "d")
       DEVICE=$OPTARG
       ;;
    *)
       ;;
    esac
done


DEVICEDATA_COLORTEMPDAY=322
DEVICEDATA_COLORTEMPNIGHT=323

# get colors from devicetemplate
COLORTEMPDAY=$(GetDeviceData "$DEVICE" "$DEVICEDATA_COLORTEMPDAY")
COLORTEMPNIGHT=$(GetDeviceData "$DEVICE" "$DEVICEDATA_COLORTEMPNIGHT")

DEVICEDATA_LONGITUDE=108
DEVICEDATA_LATITUDE=109

Q="
        SELECT PK_Device
        FROM Device
        WHERE FK_DeviceTemplate='52'
"

EVENTPLUGINID=$(RunSQL "$Q")

LONGITUDE=$(GetDeviceData "$EVENTPLUGINID" "$DEVICEDATA_LONGITUDE")
LATITUDE=$(GetDeviceData "$EVENTPLUGINID" "$DEVICEDATA_LATITUDE")

DISPLAY=:0 $REDSHIFT -l $LONGITUDE:$LATITUDE -t $COLORTEMPDAY:$COLORTEMPNIGHT

Don't know how to add a package to a template so have not added the info package yet (it's in the repos: sudo apt-get install redshift)

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: redshift support
« Reply #1 on: August 17, 2014, 03:49:18 pm »
As has been noted a couple of weeks ago, we have disabled trac for anonymous commits. Send me the output of htpasswd -mn esperegu and I shall create a login for you.