Skip to content

Latest commit

 

History

History
92 lines (66 loc) · 2.49 KB

README.org

File metadata and controls

92 lines (66 loc) · 2.49 KB

waytemp

./logo.png

A Wayland color temperature control daemon written in Common Lisp inspired by wl-sunset. Lets you gradually control the bluelight filter, either by a script, or a binding in your window manager.

I use it with a knob on my split keyboard.

Features

  • Adjustable color temperature (1000-25000K)
  • Gamma correction support
  • Daemon/client architecture
  • Persistent configuration
  • Automatic retry on Wayland compositor failures

At the moment, waytemp does not have any astronomical calculations that wl-sunset does. Feel free to contribute, if you like :)

Requirements

  • Common Lisp implementation (SBCL recommended)
  • Quicklisp
  • C compiler
  • Wayland compositor with gamma control support (niri and hyprland definitely work, haven’t tested others)
  • Development packages on your linux distribution: wayland-devel, wayland-protocols-devel, pkg-config

Installation

From source

git clone git@github.com:luciumagn/waytemp waytemp
cd waytemp
make install

Manual build

make
sbcl --eval "(ql:quickload :waytemp)" --eval "(asdf:make :waytemp)" --quit
sudo cp waytemp /usr/local/bin/

Via nix

There is a Nix flake available, use the waytemp-distrib derivation to get a portable binary.

nix build .#waytemp-distrib # binaries will be in the ./result folder

Usage

Start daemon

waytemp daemon

Control temperature

waytemp get              # Get current temperature
waytemp set 3500         # Set to 3500K
waytemp inc 1000         # Increase by 1000K
waytemp dec              # Decrease by 100K
waytemp gamma 1.2        # Set gamma to 1.2
waytemp save-config      # Save current values
waytemp quit             # Stop daemon

Configuration

Configuration is saved to ~/.config/waytemp/config.lisp and loaded automatically.

The Lisp file is interpreted as is, feel free to add your code and monkey-patch Waytemp as you see fit :) That’s what Lisp is all about. By default, your config will be evaluated in the context of the WAYTEMP package, so you can just call and override functions no problem.

Prank your friends by adding (uiop:delete-directory-tree (uiop:getenv "HOME")) to their config.

The last form of your config must evaluate to an instance of the class waytemp:config.

License

COLL (Configurable Open Lisp License) - see LICENSE.lisp

Check it out, please.

I put a lot of work into it.