Giter Site home page Giter Site logo

farva / awesome-redshift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yoryan/awesome-redshift

0.0 2.0 0.0 124 KB

A small, simple lua library for interfacing the Awesome window manager with redshift.

License: Apache License 2.0

Lua 100.00%

awesome-redshift's Introduction

Redshift for Awesome WM

This is a tiny Lua library to interface the Awesome window manager with redshift, a program that dims the screen to make it easier on your eyes, especially at night.

What makes this any more useful than gtk-redshift, you might ask? Well, it offers the following features:

  • Integration with awesome via lua wrapper functions. Toggling redshift with a keyboard shortcut? Automatically undimming the screen when launching the photo editor? Now anything is possible.
  • Support for multiple monitor setups that don't use xrandr. If you're multiheading graphics cards, this is a must-have.
  • Automatic, periodic brightness adjustments. (Well, redshift offers this out of the box, but I thought it was worth mentioning the library takes care of this for you.)

When designing this library, I followed the KISS principle. I wrote convenient wrapper functions to do the dirty work for you. It's up to you to program your own keybindings, bells, and whistles.

Install

In your awesome configuration directory:

git clone git://github.com/YoRyan/awesome-redshift.git redshift

In your rc.lua:

local redshift = require("redshift")
-- set binary path (optional)
redshift.redshift = "/usr/bin/redshift"
-- set additional redshift arguments (optional)
redshift.options = "-c ~/.config/redshift.conf"
-- 1 for dim, 0 for not dimmed
redshift.init(1)

Usage

Done! Now you have these functions at your disposal:

  • redshift.dim()
  • redshift.undim()
  • redshift.toggle()

(They're pretty self-explanatory...)

awesome-redshift's People

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.