Git Product home page Git Product logo

go-sct's Introduction

go-sct GoDoc

A color temperature setting library and CLI that operates in a similar way to f.lux and Redshift.

The command line app automatically determines your location using GeoIP and adjusts the color temperature depending on time.

For wayland support replace all commands with waysct instead of sct.

# For X11 and Windows
$ go get -u github.com/d4l3k/go-sct/cmd/sct

$ sct # Launch in background
$ sct 3000 # One time temperature change. Temperature must be 1000-10000.

# For Wayland
$ go get -u github.com/d4l3k/go-sct/cmd/waysct

$ waysct # Launch in background
$ waysct 3000 # One time temperature change. Wayland requires a persistent manager so this will immediately revert.

Windows

By default, the lowest color temperature allowed is around 4500K. More information is available here

There is a workaround to allow all possible adjustments by alterting the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ICM]
"GdiIcmGammaRange"=dword:00000100

Save the above as a file with a ".reg" extension and double click to apply.

Credit

Setting the color temperature uses a port of sct in Go. Credit goes to him for figuring out how to do this.

go-sct also provides the geoip package which is a packaged version of http://devdungeon.com/content/ip-geolocation-go

License

Made by Tristan Rice.

go-sct is licensed under the MIT license. geoip and sct are copyrighted by their respective owners.

waysct is using code from the redshift implementation and is licensed under GPLv3. See https://github.com/minus7/redshift/commit/7da875d34854a6a34612d5ce4bd8718c32bec804

go-sct's People

Contributors

d4l3k avatar faf0 avatar howeyc avatar mtoohey31 avatar raylai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

faf0

go-sct's Issues

Question: time-based daemon

What are your thoughts on making the sct daemon adjust temperature based on time (perhaps setting the temperature every 15 min)?

ie.

--sunrise-time "06:00" --sunrise-temp 4500
--brightest-time "14:00" --brightest-temp 8600
--sunset-time "21:00" --sunset-temp 3000
--adjust-duration-secs "900"

This way you could have an afternoon "jolt" of blue light (if you set it that way). Also, this would work for people that have a schedule that is consistent regardless of the what sun is doing (most people's office hours are consistent throughout the year).

SCT disabled by UAC prompt

I'm at sct 1000 most of the night on Windows 7 64 bit. sct was working fine until I tried to open another powershell in admin mode (C-S-Ret on powershell in the start menu). When the UAC prompt pops up, my screen goes back to (what appears to be) normal.

When I run sct 1000 again, nothing happens. When I run sct <some other number>, sct works again and I can then sct 1000 to get back to my desired state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.