2026-11-09 22:50:51 +02:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
# Bananarchy cover display daemon. Only active on flip devices; the
|
|
|
|
|
# lid-profile file is written by scripts/apply-bananarchy-overlay.sh.
|
|
|
|
|
|
|
|
|
|
description="Nokia 2720 Flip external cover display"
|
|
|
|
|
# The recovered native bananarchy-coverd busy-loops at 100% CPU on the
|
|
|
|
|
# spidev backend (gpio110/DC is owned by panel-mipi-dbi-spi) and paints
|
2026-11-10 19:41:57 +02:00
|
|
|
# nothing. Keep that binary installed as a diagnostic, but run the compiled
|
|
|
|
|
# idle IPC server: it drives the external panel through /dev/spidev0.1 only
|
|
|
|
|
# while the flip is closed and hands the QUP5 bus back on open. No Python
|
|
|
|
|
# runs here.
|
2026-11-09 22:50:51 +02:00
|
|
|
command="/usr/bin/bananarchy-cover-idle"
|
|
|
|
|
command_args="--config /etc/bananarchy/cover-display.conf"
|
|
|
|
|
command_background="yes"
|
|
|
|
|
pidfile="/run/bananarchy/cover-display.pid"
|
|
|
|
|
output_log="/run/bananarchy/cover-display.log"
|
|
|
|
|
error_log="/run/bananarchy/cover-display.log"
|
|
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
|
need udev
|
|
|
|
|
after udev-settle
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
start_pre() {
|
|
|
|
|
mkdir -p /run/bananarchy
|
|
|
|
|
chmod 0755 /run/bananarchy
|
2026-11-11 08:23:12 +02:00
|
|
|
# /run is tmpfs: clear stale transition guards after every reboot.
|
2026-11-11 14:20:42 +02:00
|
|
|
rm -f /run/bananarchy/cover-backlight \
|
|
|
|
|
/run/bananarchy/cover-bl-force \
|
|
|
|
|
/run/bananarchy/cover-power-state \
|
|
|
|
|
/run/bananarchy/cover-runtime.conf 2>/dev/null || true
|
2026-11-09 22:50:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
start() {
|
|
|
|
|
if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" != "flip" ]; then
|
|
|
|
|
ebegin "Skipping cover display (not a flip device)"
|
|
|
|
|
eend 0
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
default_start
|
2026-11-10 13:23:03 +02:00
|
|
|
# Seed the compact network/battery indicators once at boot; later changes
|
|
|
|
|
# arrive from the NetworkManager dispatcher (bananarchy-cover-event.sh).
|
|
|
|
|
/usr/bin/bananarchy-cover-event.sh network >/dev/null 2>&1 &
|
2026-11-09 22:50:51 +02:00
|
|
|
}
|