Skip to content

jakobkreft/autoredshift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

banner

Autoredshift

A tool to automatically adjust screen temperature based on a custom curve.

Autoredshift allows you to define a custom temperature curve throughout the day and automatically adjusts your screen's color temperature using redshift. It includes a graphical configuration tool to easily edit your curve.

Prerequisites

  • Linux (tested on X11)
  • Redshift: Ensure redshift is installed and in your PATH.
    sudo apt install redshift  # Debian/Ubuntu
    sudo pacman -S redshift    # Arch Linux
    sudo dnf install redshift  # Fedora
  • Rust/Cargo: Only if you build the project yourself.

Installation

  1. Clone the repository or download the source.
  2. Install using Cargo:
    cargo install --path .
    This will install the autoredshift binary to your Cargo bin directory (usually ~/.cargo/bin).

Install from GitHub Releases

Note: The automated release workflow currently produces a single x86_64 binary.

  1. Download the latest autoredshift asset from the Releases page.
  2. Make it executable (and optionally run it in-place):
    chmod +x autoredshift
    ./autoredshift --version
  3. Move it somewhere on your PATH:
    mkdir -p ~/.local/bin
    mv autoredshift ~/.local/bin/
  4. Ensure ~/.local/bin (or wherever you placed it) is on your PATH, reload your shell, and invoke the tool:
    autoredshift --version

Usage

Run Manually

To calculate the current target temperature and apply it immediately:

autoredshift

Configuration

To open the graphical configuration editor:

autoredshift --config
  • Double-click to add a point.
  • Right-click to remove a point.
  • Drag points to adjust the curve.
  • Scroll to zoom.
autoredshift_graph

Automation

To have Autoredshift run automatically every minute, you can add a cron job.

  1. Open your crontab:

    crontab -e
  2. Add the following line (replace <user> with your username and verify paths):

    * * * * * DISPLAY=:0 XAUTHORITY=/run/lightdm/<user>/xauthority /home/<user>/.cargo/bin/autoredshift >> /home/<user>/autoredshift.log 2>&1

    Note:

    • DISPLAY=:0 is standard for most X11 setups.
    • XAUTHORITY path may vary depending on your display manager (e.g., /home/<user>/.Xauthority or /run/user/<uid>/gdm/Xauthority). Check echo $XAUTHORITY in your terminal.
    • Ensure the path to autoredshift matches where cargo install placed it.

About

Automatically adjust screen temperature based on a custom curve.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages