You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
532 B

#!/usr/bin/env sh
# shellcheck disable=SC2034
SXMO_NO_ICONS=1 #just to make it a bit faster
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
open() {
#Note: KEYBOARD_ARGS is not quoted by design as it may includes a pipe and further tools
# shellcheck disable=SC2086
pidof "$KEYBOARD" > /dev/null || eval "$KEYBOARD" $KEYBOARD_ARGS &
}
close() {
pkill "$KEYBOARD"
}
if [ "$1" = "toggle" ]; then
close || open
elif [ "$1" = "close" ]; then
close
else
open
fi