Skip to content

Instantly share code, notes, and snippets.

@martyglaubitz
Created June 15, 2026 10:01
Show Gist options
  • Select an option

  • Save martyglaubitz/3a94de493a05a4fd1ecff5027d4c8d0c to your computer and use it in GitHub Desktop.

Select an option

Save martyglaubitz/3a94de493a05a4fd1ecff5027d4c8d0c to your computer and use it in GitHub Desktop.
Finds and enables keyboard LEDs that usually require the scroll lock key to toggle
#!/bin/bash
LED_PATH=$(find /sys/class/leds -maxdepth 1 -name '*::scrolllock' | grep -v 'input2::scrolllock' | head -n1)
if [ -z "$LED_PATH" ]; then
echo "Kein passendes Scroll-Lock-LED-Gerät gefunden."
exit 1
fi
echo 1 | sudo tee "$LED_PATH/brightness"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment