Blinking CapsLock's LED while pinging web-server

Fun with LED, or how to get CapsLock's LED to blink on response from web server

I've found very interesting Twitter's post. It shows how keyboard's LED could be utilized.

Just amended a little bit the script and made CapsLock's LED to blink on laptop.


  • xkbcomp $DISPLAY myconf.xkb - save settings

  • vim myconf.xkb - in config make changes in field 'indicator "Caps Lock"' from !allowExplicit; to allowExplicit; (remove exclamation mark)

  • xkbcomp myconf.xkb $DISPLAY - load settings

  • start blinking: ping | stdbuf -oL awk -F[=\ ] '/from/{ms=$(NF-1); print ms/1000.0 " " 1-ms/1000.0}' | while read on off ; do echo $on $off ; xset led 1 ; sleep $on ; xset -led 1 ; sleep $off ; done

Instruction how to load settings and make CapsLock LED blinking have taken from here

Here is a result :)

"CapsLock блимає"