layer-notify 342 B

123456789101112
  1. #!/bin/sh
  2. HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
  3. sudo "${HL}" | grep --line-buffered LAYER: | \
  4. (while read line; do
  5. case $line in
  6. LAYER:*)
  7. layer="$(echo $(echo $line | cut -d: -f2-))"
  8. notify-send -i mark-location-symbolic "Switched to layer: $layer"
  9. ;;
  10. esac
  11. done)