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. 6
      scripts/core/sxmo_powerbutton.sh

@ -6,6 +6,12 @@
if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/powerbutton" ]; then if [ -x "$XDG_CONFIG_HOME/sxmo/hooks/powerbutton" ]; then
"$XDG_CONFIG_HOME/sxmo/hooks/powerbutton" "$XDG_CONFIG_HOME/sxmo/hooks/powerbutton"
else
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 else
sxmo_keyboard.sh toggle sxmo_keyboard.sh toggle
fi fi
fi

Loading…
Cancel
Save