Files
sxmo-utils/scripts/core/sxmo_dmenu_with_kb.sh
Peter John Hartman 8bd1feb1cf give keyboard time to open
Sometimes the menu would open before keyboard in sxmo_menu_with_kb.sh.
Reproduce: from main menu, click texts.  A small pause is sufficient.
This is bad since then menu overlaps keyboard and you can't type esc
or numbers.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-01-22 15:15:25 -08:00

22 lines
388 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors
if [ -n "$WAYLAND_DISPLAY$DISPLAY" ]; then
if sxmo_keyboard.sh isopen; then
wasopen="1"
fi
sxmo_keyboard.sh open
sleep .1 # give keyboard time to open
fi
OUTPUT="$(cat | sxmo_dmenu.sh "$@")"
exitcode=$?
if [ -z "$wasopen" ]; then
sxmo_keyboard.sh close
fi
printf %s "$OUTPUT"
exit $exitcode