G810-led

From NixOS Wiki
Revision as of 10:53, 11 May 2024 by N42 (talk | contribs) (Added my basic configuration of `pkgs.g810-led`.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installation

The program MatMoul/g810-led is provided by the package pkgs.g810-led.

To be able to run it, you should add the following udev config :

services.udev = {
  packages = [
    pkgs.g810-led
  ];
};

After a nixos-rebuild switch you should be able to run g810-led -a ff0000.

Add colors at keyboard plug

Currently, you need to run this command after you plug your keyboard in, with the following udev rule, you are able to run the command automatically after any USB device is plugged in :

services.udev = {
  packages = [
    pkgs.g810-led
  ];
  extraRules = ''
    ACTION=="add", SUBSYSTEM=="usb", RUN+="${pkgs.g810-led}/bin/g810-led -a 0000ff"
  '';
};