hyprlux

Crates.iohyprlux
lib.rshyprlux
version0.1.4
sourcesrc
created_at2024-10-30 20:26:00.13272
updated_at2024-10-30 20:26:00.13272
descriptionHyprland utility that automates vibrance and night light control
homepage
repositoryhttps://github.com/amadejkastelic/Hyprlux
max_upload_size
id1429155
size75,534
Amadej Kastelic (amadejkastelic)

documentation

README

Hyprlux

A Hyprland utility program that automatically switches between shaders.

It currently supports two shaders with configurable strengths:

  • Night light (blue light filter) - based on location or custom times
  • Vibrance - toggles digital vibrance based on currently active window

Installation

NixOS NixOS Version

Click to expand

Add hyprlux to your flake inputs:

inputs = {
  hyprlux = {
    url = "github:amadejkastelic/Hyprlux";
  };
};

Then import either the home manager module or nixos module:

imports = [
  inputs.hyprlux.nixosModules.default
];
imports = [
  inputs.hyprlux.homeManagerModules.default
];

And configure it:

{inputs, ...}: {
  programs.hyprlux = {
    enable = true;

    systemd = {
      enable = true;
      target = "hyprland-session.target";
    };

    night_light = {
      enabled = true;
      # Manual sunset and sunrise
      start_time = "22:00";
      end_time = "06:00";
      # Automatic sunset and sunrise
      latitude = 46.056946;
      longitude = 14.505751;
      temperature = 3500;
    };

    vibrance_configs = [
      {
        window_class = "steam_app_1172470";
        window_title = "Apex Legends";
        strength = 100;
      }
      {
        window_class = "cs2";
        window_title = "";
        strength = 100;
      }
    ];
  };
}

Arch AUR Version

Click to expand

Install using your favorite AUR helper:

paru -S hyprlux

Configuration

Hyprlux looks for configs in the following locations (sorted by priority):

  • Path passed as first argument when running the binary
  • $XDG_CONFIG_HOME/hypr/hyprlux.toml
  • /etc/hyprlux/config.toml

Example configurations are available in examples.

Building

Run cargo build

TODO

  • Toggle night light based on location and time of day
  • Allow config reload
  • Publish to aur
  • Add nix module systemd service support
  • Publish crate
Commit count: 51

cargo fmt