From 12e4a32fe7705e62960a9d80b547c20596e9066b Mon Sep 17 00:00:00 2001 From: Sebastian Lindholm Gustafsson Date: Mon, 28 Oct 2024 00:00:27 +0100 Subject: [PATCH 1/2] Added nixos flake installation instructions to the installation readme. --- razer_control_gui/README.md | 82 ++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 25 deletions(-) diff --git a/razer_control_gui/README.md b/razer_control_gui/README.md index 27f5cec..78ee5b5 100644 --- a/razer_control_gui/README.md +++ b/razer_control_gui/README.md @@ -1,55 +1,87 @@ # Experimental code in here! ## Current features -* Full background daemon - Auto load state on machine startup based on last configuration -* CLI and GUI application for adjusting basic settings + +- Full background daemon - Auto load state on machine startup based on last configuration +- CLI and GUI application for adjusting basic settings ![](Screenshoot.png) ## Installing + 1. Install cargo or rustc 2. add `libdbus-1-dev libusb-dev libhidapi-dev libhidapi-hidraw0 pkg-config libudev-dev libgtk-3-dev` packages (or equivelent) 3. run `./install.sh install` as a normal user 4. reboot 5. Enjoy! +### Nixos flake installation + +1. Add this flake to your inputs using + +``` +inputs.razerdaemon.url = "github:JosuGZ/razer-laptop-control"; +``` + +2. Import the razerdaemon module where your inputs are in scope + +``` +imports = [ + inputs.razerdaemon.nixosModules.default +]; +``` + +3. Enable the exposed nixos option using + +``` +services.razer-laptop-control.enable = true; +``` + ## Usage of CLI Application + ``` -razer-cli +razer-cli ``` ### action -* read - Read an attribute (get its current state) - No additional args are supplied -* write - Write an attribute, and save it to configuration - See below for argument counts + +- read - Read an attribute (get its current state) - No additional args are supplied +- write - Write an attribute, and save it to configuration - See below for argument counts ### attribute -* fan - Fan RPM. ARG: 0 = Auto, anything else is interpreted as a litteral RPM -* power - Power mode. ARG: 0 = Balanced, 1 = Gaming, 2 = Creator, 4 = Custom -* brightness - Change brightness of the keyboard -* logo - change logo state (for models with logo): 0 = off, 1 = on, 2 = breathing -* sync - sync light effect for battery/ac -* standard_effect - effects predefined in keyboard controller -* colour - Keyboard colour. ARGS: R G B channels, each channel is set from 0 to 255 + +- fan - Fan RPM. ARG: 0 = Auto, anything else is interpreted as a litteral RPM +- power - Power mode. ARG: 0 = Balanced, 1 = Gaming, 2 = Creator, 4 = Custom +- brightness - Change brightness of the keyboard +- logo - change logo state (for models with logo): 0 = off, 1 = on, 2 = breathing +- sync - sync light effect for battery/ac +- standard_effect - effects predefined in keyboard controller +- colour - Keyboard colour. ARGS: R G B channels, each channel is set from 0 to 255 ### power_state -* ac -* bat + +- ac +- bat #### standard_effects - * 'off' - * 'wave' - PARAMS: - * 'reactive' - PARAMS: - * 'breathing' - PARAMS: [Red] [Green] [Blue] [Red] [Green] [Blue] - * 'spectrum' - * 'static' - PARAMS: - * 'starlight' - PARAMS: [Red] [Green] [Blue] [Red] [Green] [Blue] + +- 'off' +- 'wave' - PARAMS: +- 'reactive' - PARAMS: +- 'breathing' - PARAMS: [Red] [Green] [Blue] [Red] [Green] [Blue] +- 'spectrum' +- 'static' - PARAMS: +- 'starlight' - PARAMS: [Red] [Green] [Blue] [Red] [Green] [Blue] #### custom power control + Custom power control take two more parameters: cpu boost and gpu boost -* 0 - low power -* 1 - normal -* 2 - high -* 3 - boost (only for CPU and only for Advanced 2020 model and Studio Edition) + +- 0 - low power +- 1 - normal +- 2 - high +- 3 - boost (only for CPU and only for Advanced 2020 model and Studio Edition) + ``` razer-cli write power ac 4 3 2 ``` From de8fe79b78adb3477da3981c885ee65a1cfe078a Mon Sep 17 00:00:00 2001 From: Sebastian Lindholm Gustafsson Date: Mon, 28 Oct 2024 00:02:30 +0100 Subject: [PATCH 2/2] Cleanup. --- razer_control_gui/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/razer_control_gui/README.md b/razer_control_gui/README.md index 78ee5b5..2b7ff69 100644 --- a/razer_control_gui/README.md +++ b/razer_control_gui/README.md @@ -9,6 +9,8 @@ ## Installing +### Compiling from source + 1. Install cargo or rustc 2. add `libdbus-1-dev libusb-dev libhidapi-dev libhidapi-hidraw0 pkg-config libudev-dev libgtk-3-dev` packages (or equivelent) 3. run `./install.sh install` as a normal user