summaryrefslogtreecommitdiff
path: root/keyboards/ergodox/keymaps/algernon/tools/hid-commands
diff options
context:
space:
mode:
authorGergely Nagy2016-09-18 11:48:47 +0200
committerGergely Nagy2016-09-18 11:48:47 +0200
commit3e128552d92714ff86d4378b4e3acccc62d6f132 (patch)
treeb64a6f9d4955b83250196516c95bf191d5d91813 /keyboards/ergodox/keymaps/algernon/tools/hid-commands
parenta258358b6c2df0d1347a6506831076ef6a9784b3 (diff)
Update the ergodox/algernon keymap to v1.7
Overall changes =============== * The number row has been completely rearranged on both the **Base** and the **ADORE** layers. * The number/function key behavior was changed: function keys are now on the **Media**. * The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers. * The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. * A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. ADORE ===== * `Y` and `X` have been swapped again. Media/Navigation layer ====================== * The function keys are now on this layer. * Mouse keys have been removed. * Media start/stop/prev/next have been removed. * `Print screen` has been removed. * There is only one screen lock key now. Heatmap ======= * Fixed a few issues in the finger-stats calculation. * The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. * The heatmap tool will now colorize the stats by default. * The periodic stats are now printed in a more compact format. Tools ===== * Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. * Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. * A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Diffstat (limited to 'keyboards/ergodox/keymaps/algernon/tools/hid-commands')
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/hid-commands61
1 files changed, 61 insertions, 0 deletions
diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
new file mode 100755
index 000000000..f3b83cf6d
--- /dev/null
+++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
@@ -0,0 +1,61 @@
+#!/bin/bash
+set -e
+
+cmd_wm () {
+ WIN="$(xdotool getactivewindow)"
+ wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
+ xdotool windowsize ${WIN} 100% 100%
+ wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
+}
+
+_cmd_appsel () {
+ wmctrl -x -a $1 || true
+ xdotool key Escape
+}
+
+cmd_appsel_music () {
+ wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true
+ xdotool key Escape
+}
+
+cmd_appsel_slack () {
+ _cmd_appsel slack
+}
+
+cmd_appsel_emacs () {
+ _cmd_appsel emacs24
+}
+
+cmd_appsel_term () {
+ _cmd_appsel gnome-terminal
+}
+
+cmd_appsel_chrome () {
+ _cmd_appsel chromium
+}
+
+cmd_help () {
+ cat <<EOF
+Use the source, Luke!
+EOF
+}
+
+while read l; do
+ case "$l" in
+ "CMD:"*)
+ ;;
+ *)
+ continue
+ ;;
+ esac
+
+ cmd="$(echo $l | cut -d: -f2-)"
+
+ echo "Got command: ${cmd}"
+
+ if type cmd_${cmd} >/dev/null 2>&1; then
+ cmd_${cmd}
+ fi
+done
+
+