aa9c6e9f59
ADORE ----- * Major rearrangements were made, to reduce pinky use, and to balance out the hand usage. Tools ----- * The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered. * The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned. Miscellaneous ------------- * Fixed the **Steno** toggle key. * My wife is now present on the keyboard too. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
73 lines
1.3 KiB
Bash
Executable file
73 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
LAST_APPSEL_START=0
|
|
|
|
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_appsel_start () {
|
|
APPSEL_START=$(date +%s)
|
|
if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
|
|
return
|
|
fi
|
|
LAST_APPSEL_START=$APPSEL_START
|
|
notify-send -t 1000 "Please select an application!" -c device -u low \
|
|
-i /usr/share/icons/Adwaita/24x24/devices/video-display.png
|
|
}
|
|
|
|
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
|
|
|
|
|