Skip to content

Instantly share code, notes, and snippets.

@InternetUnexplorer
Created January 1, 2021 20:52
Show Gist options
  • Save InternetUnexplorer/1fa87231a478b8f19fae2ab7047a78fa to your computer and use it in GitHub Desktop.
Save InternetUnexplorer/1fa87231a478b8f19fae2ab7047a78fa to your computer and use it in GitHub Desktop.
Patch and NixOS overlay to add support for starlight mode on the Mid 2017 Razer Blade Stealth to OpenRazer
diff --git a/driver/razerkbd_driver.c b/driver/razerkbd_driver.c
index 909a797..a209cfc 100644
--- a/driver/razerkbd_driver.c
+++ b/driver/razerkbd_driver.c
@@ -1242,6 +1242,7 @@ static ssize_t razer_attr_write_mode_starlight(struct device *dev, struct device
}
break;
+ case USB_DEVICE_ID_RAZER_BLADE_STEALTH_MID_2017:
case USB_DEVICE_ID_RAZER_BLADE_STEALTH_LATE_2017:
if(count == 7) {
report = razer_chroma_standard_matrix_effect_starlight_dual(VARSTORE, BACKLIGHT_LED, buf[0], (struct razer_rgb*)&buf[1], (struct razer_rgb*)&buf[4]);
self: super:
{
linuxPackages_latest = super.linuxPackages_latest.extend (lpSelf: lpSuper: {
openrazer = lpSuper.openrazer.overrideAttrs (old: rec {
patches = (old.patches or [ ]) ++ [ ./fix-starlight.patch ];
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment