Giter VIP home page Giter VIP logo

xrandr-nightmode's Introduction

Overview

This utility imitates the "night mode" feature of f.lux, which changes the color of your screen, basically turning white into black and everything else into shades of red. This makes reading on a computer screen late at night much more enjoyable in my experience.

This is very simple code which reuses the hard work of the Redshift project as well as Zoltan Padrah's xrandr-invert-colors. Praise to them.

Compiling and installing

You need the XRandR development file and a C compiler. Typing make install will copy the binary to $(HOME)/bin/xrandr-nightmode by default.

Using

When started, xrandr-nightmode will silently fork and run in the background by default. To turn night mode on or off, send it a USR1 signal. The daemon restores the screen to its original colors on exit.

$ xrandr-nightmode
$ killall -USR1 xrandr-nightmode # night mode turns on
$ killall -USR1 xrandr-nightmode # night mode turns off
...
$ killall xrandr-nightmode # terminates the daemon, turning night mode off if needed

Many window managers can be set up to send the signal on a key press. For instance, when using i3, addding the following line to your configuration file makes the XF86LaunchA multimedia key responsible for enabling/disabling night mode.

bindsym XF86 exec killall -USR1 xrandr-nightmode

To keep xrandr-nightmode in the foreground, run it with -f. To turn night mode on by default, run it with -n.

License

xrandr-nightmode is licensed under the GNU General Public License v3.

Related projects

xrandr-nightmode's People

Contributors

adrieng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

m2608

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.