Skip to content

Instantly share code, notes, and snippets.

@jozko
Created November 12, 2018 15:17
Show Gist options
  • Save jozko/7c483de54170f5c1fcf329c62c9efaf9 to your computer and use it in GitHub Desktop.
Save jozko/7c483de54170f5c1fcf329c62c9efaf9 to your computer and use it in GitHub Desktop.
Simple razer keyboard setup script - manage backlight color and brightness
#!/bin/bash
KBD=$(find -L /sys/bus/hid/drivers/razerkbd/ -maxdepth 2 -type f -name device_type -print 2> /dev/null | grep device_type)
KBD_DIR=$(dirname ${KBD})
echo ${KBD_DIR}
echo "Set keyboard color to E0E0E0"
echo -n -e "\xF0\xE0\xE0" > ${KBD_DIR}/matrix_effect_static
echo "Set brightness to 60"
echo 60 > ${KBD_DIR}/matrix_brightness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment