Skip to content

Instantly share code, notes, and snippets.

@jeremija
Created November 24, 2013 10:17
Show Gist options
  • Save jeremija/7625547 to your computer and use it in GitHub Desktop.
Save jeremija/7625547 to your computer and use it in GitHub Desktop.
Caps lock state notification (xfce4 compatible)
#!/bin/sh
#state does not change immediately
sleep 0.2
#determine the state
STATE=`xset q | grep -oE "Caps Lock: *?(on|off)" | grep -oE "(on|off)"`
#send a notification
notify-send -i preferences-desktop-keyboard-shortcuts "Caps lock" "$STATE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment