~mil/sxmo-utils

ref: a3e4dc0fa47d4b73bf2c3d0f138e253abdbe982c sxmo-utils/scripts/core/sxmo_dmenu_with_kb.sh -rwxr-xr-x 312 bytes
a3e4dc0fStacy Harper Make all sxmo menu SSH mode compatible 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env sh

TERMMODE=$([ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && echo "true")
if [ "$TERMMODE" = "true" ]; then
	exec vis-menu -i -l 10
fi

wasopen="$(sxmo_keyboard.sh isopen && echo "yes")"

sxmo_keyboard.sh open
OUTPUT="$(cat | dmenu "$@")"
[ -z "$wasopen" ] && sxmo_keyboard.sh close
echo "$OUTPUT"