diff --git a/scripts/core/sxmo_powerbutton.sh b/scripts/core/sxmo_powerbutton.sh index b63de09..1cdb4bb 100755 --- a/scripts/core/sxmo_powerbutton.sh +++ b/scripts/core/sxmo_powerbutton.sh @@ -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