summaryrefslogtreecommitdiff
path: root/keyboards/ergodox/keymaps/algernon/tools/layer-notify
diff options
context:
space:
mode:
authorDamien <Dbroqua@users.noreply.github.com>2016-09-25 14:03:27 +0200
committerGitHub <noreply@github.com>2016-09-25 14:03:27 +0200
commitb75cb53c4a67597dd453fb8bb54af1936b422f6b (patch)
tree590591f00a3782b43253a1321220c7652cd9799b /keyboards/ergodox/keymaps/algernon/tools/layer-notify
parent7a91cce869f7cda8a42bf071ba77ee6096772d20 (diff)
parent67252625165ffa0a08e723a52562a853aa4b496b (diff)
Merge pull request #5 from jackhumbert/master
Merge from jackhumbert
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)