Skip to content

Instantly share code, notes, and snippets.

@megacos
Created September 25, 2022 07:42
Show Gist options
  • Save megacos/3f6dfb1d590a34efccf48755014e881a to your computer and use it in GitHub Desktop.
Save megacos/3f6dfb1d590a34efccf48755014e881a to your computer and use it in GitHub Desktop.
turn on/off backlit "xset led 3" with "scroll lock" and autostart led
#!/bin/bash
xset led 3
## save and add this script to autostart
#!/bin/bash
on=$(xset -q | grep 'Scroll Lock:' | cut -d ":" -f 7)
echo $on
if [ $on == "off" ]; then
xset led named "Scroll Lock"
else
xset -led named "Scroll Lock"
fi
## Save and bind to a key with a shortcut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment