#!/bin/sh # Wake the screen for an external event (incoming call / SMS / notification) # and reset dwm's idle-blank timer so it cannot blank again immediately. export DISPLAY="${DISPLAY:-:0}" # With the flip closed every wake is cover-only: do not touch the main panel, # the keypad backlight, the idle timer or the Sxmo state machine. if ! "${BANANARCHY_LID_GATE:-/usr/bin/bananarchy-lid-gate.sh}" wake; then exit 0 fi # Cancel a pending idle-blank lock before the panel is powered on, so a wake # does not race with the screenoff transition started by the blank handler. "${BANANARCHY_IDLE_LOCK_HELPER:-/usr/bin/bananarchy-idle-lock.sh}" cancel >/dev/null 2>&1 || true "${BANANARCHY_WM_CMD:-/usr/bin/sxmo_wm.sh}" display on >/dev/null 2>&1 || true date +%s > /tmp/bananarchy_last_wake 2>/dev/null || true p="$(pidof -s dwm 2>/dev/null || true)" [ -n "$p" ] && kill -USR1 "$p" 2>/dev/null || true exit 0