compatibility with megapixels 0.16: power button takes a picture instead of toggling the keyboard, only when megapixels is active

master
Maarten van Gompel 4 years ago
parent c4caf932ff
commit e0cff05b0c
  1. 8
      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

Loading…
Cancel
Save