From 36535ebfe30a505927fedec469759e9675c00a86 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Sun, 28 Mar 2021 21:24:50 +0200 Subject: [PATCH] added another layer between the power button press and the keyboard script, with option to override using a hook --- scripts/core/sxmo_powerbutton.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/core/sxmo_powerbutton.sh diff --git a/scripts/core/sxmo_powerbutton.sh b/scripts/core/sxmo_powerbutton.sh new file mode 100755 index 0000000..5cec671 --- /dev/null +++ b/scripts/core/sxmo_powerbutton.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +# include common definitions +# shellcheck source=scripts/core/sxmo_common.sh +. "$(dirname "$0")/sxmo_common.sh" + +if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/powerbutton" ]; then + "$XDG_CONFIG_HOME/sxmo/hooks/powerbutton" "$@" +else + sxmo_keyboard.sh "$@" +fi