summaryrefslogtreecommitdiff
path: root/keyboards/ergodox/keymaps/algernon/tools/layer-notify
diff options
context:
space:
mode:
authorxyverz <xyverz@gmail.com>2016-09-30 23:16:50 -0700
committerxyverz <xyverz@gmail.com>2016-09-30 23:16:50 -0700
commite69e4c1ef2cd553597e10d1ae5b0384d29f2c16f (patch)
tree957641d33f60e75b8fd747da11ed3bca06f0cfab /keyboards/ergodox/keymaps/algernon/tools/layer-notify
parente3c3170610561042df3d67f358c15553878a2012 (diff)
parent35e6870e5c8943c044187256e01c96ef400ca067 (diff)
Merge remote-tracking branch 'jackhumbert/master'
Diffstat (limited to 'keyboards/ergodox/keymaps/algernon/tools/layer-notify')
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/layer-notify12
1 files changed, 12 insertions, 0 deletions
diff --git a/keyboards/ergodox/keymaps/algernon/tools/layer-notify b/keyboards/ergodox/keymaps/algernon/tools/layer-notify
new file mode 100755
index 0000000000..627c2861ef
--- /dev/null
+++ b/keyboards/ergodox/keymaps/algernon/tools/layer-notify
@@ -0,0 +1,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)