~mil/sxmo-utils

e0cff05b0c3ad73794b9ace40e212511f4f3907d — Maarten van Gompel 8 months ago c4caf93
compatibility with megapixels 0.16: power button takes a picture instead of toggling the keyboard, only when megapixels is active
1 files changed, 7 insertions(+), 1 deletions(-)

M scripts/core/sxmo_powerbutton.sh
M scripts/core/sxmo_powerbutton.sh => scripts/core/sxmo_powerbutton.sh +7 -1
@@ 7,5 7,11 @@
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/powerbutton" ]; then
	"$XDG_CONFIG_HOME/sxmo/hooks/powerbutton"
else
	sxmo_keyboard.sh toggle
	XPROPOUT="$(xprop -id "$(xdotool getactivewindow)")"
	WMCLASS="${1:-$(echo "$XPROPOUT" | grep WM_CLASS | cut -d ' ' -f3-)}"
	if echo "$WMCLASS" | grep -i "megapixels"; then
		xdotool key --clearmodifiers "space"
	else
		sxmo_keyboard.sh toggle
	fi
fi