parent
c51414257e
commit
4eb914265d
10 changed files with 44 additions and 17 deletions
@ -1,6 +1,6 @@ |
|||||||
#!/usr/bin/env sh |
#!/usr/bin/env sh |
||||||
|
|
||||||
pidof "$KEYBOARD" >&2 || "$KEYBOARD" & |
sxmo_keyboard.sh open |
||||||
OUTPUT="$(cat | dmenu "$@")" |
OUTPUT="$(cat | dmenu "$@")" |
||||||
pkill "$KEYBOARD" >&2 |
sxmo_keyboard.sh close |
||||||
echo "$OUTPUT" |
echo "$OUTPUT" |
||||||
|
@ -0,0 +1,23 @@ |
|||||||
|
#!/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 -q "$KEYBOARD" || "$KEYBOARD" $KEYBOARD_ARGS & |
||||||
|
} |
||||||
|
|
||||||
|
close() { |
||||||
|
pkill "$KEYBOARD" |
||||||
|
} |
||||||
|
|
||||||
|
if [ "$1" = "close" ]; then |
||||||
|
close |
||||||
|
else |
||||||
|
open |
||||||
|
fi |
Loading…
Reference in new issue