summaryrefslogtreecommitdiff
path: root/keyboards/ergodox/keymaps/algernon/tools/layer-notify
blob: 627c2861ef8d4bb7dae8e61d10f602884bcd1377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"

sudo "${HL}" | grep --line-buffered LAYER: | \
(while read line; do
     case $line in
         LAYER:*)
             layer="$(echo $(echo $line | cut -d: -f2-))"
             notify-send -i mark-location-symbolic "Switched to layer: $layer"
             ;;
     esac
 done)