Giter Site home page Giter Site logo

redshift-controller's Introduction

redshift-controller

Controller for the application redshift. Written in bash.

Offers functions to manipulate the display temperature defined by redshift and can be variously applied. If changeing redshift parameters by yourself, unexpected behaviour can happen.

redshift-controller can be in three states: default: redshift behaves as in the config defined (with transition between day and night mode). Can be reached by calling the reset() method. manual: redshift has a static temperature defined by the redshift-controller (value is stored in a temporary file). Is reached by calling the setTemperature() method or any which calls this method. disabled: redshift is not running and also not in manual mode. Is reached by calling the disable() method.

Functions

printTemperature(): Returns (echo) the temperature with color flag in front and icon (depending on how it is defined).

setTemperature(): Sets temperature to the argument. Only checks if an argument is given and not if it's in the correct range.

increase(): Increases the temperature to the next multiple of the value of the first argument (or STEPDEFAULT). But stops at the REDSHIFTMAX.

decrease(): Decreases the temperature to the next multiple of the value of the first argument (or STEPDEFAULT). But stops at the REDSHIFTMIN.

reset(): Resets redshift to the default configurations (probably defined in the config file).

disable(): Disables are effects redshift has on the display

Application Examples

polybar: path to redshift-controller.sh = ~/.config/polybar/redshift-controller.sh

[module/redshift]
type = custom/script
exec = ~/.config/polybar/redshift-controller.sh printTemperature
interval = 1

click-left = ~/.config/polybar/redshift-controller.sh restart
click-left = ~/.config/polybar/redshift-controller.sh disable
scroll-up =  ~/.config/polybar/redshift-controller.sh increase 200
scroll-down =  ~/.config/polybar/redshift-controller.sh decrease 200

redshift-controller's People

Contributors

fstreun avatar

Watchers

James Cloos avatar  avatar

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.