G810-led: Difference between revisions

From NixOS Wiki
N42 (talk | contribs)
Added my basic configuration of `pkgs.g810-led`.
 
Klinger (talk | contribs)
Line 21: Line 21:
};
};
</syntaxhighlight>
</syntaxhighlight>
[[Category: Hardware]]

Revision as of 12:00, 11 May 2024

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"
  '';
};