Refactor first-boot rotation setup to use kernel command line for persistent display rotation. Update documentation to clarify the new method of setting screen orientation (90° clockwise) via cmdline.txt, eliminating the need for one-shot scripts. Enhance logging and user guidance for rotation and wallpaper configuration during first boot.
This commit is contained in:
13
emmc-provisioning/cloud-init/set-rotation-at-login.sh
Normal file
13
emmc-provisioning/cloud-init/set-rotation-at-login.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Set reTerminal DM (labwc/Wayland) rotation to Left at every login.
|
||||
# Runs from autostart when user pi logs in; does not remove itself.
|
||||
# Use this when wlr-randr transform does not persist across reboots.
|
||||
sleep 5
|
||||
OUTPUT=""
|
||||
if command -v wlr-randr &>/dev/null; then
|
||||
OUTPUT=$(wlr-randr 2>/dev/null | awk '/^[A-Za-z0-9_-]+ /{print $1; exit}')
|
||||
fi
|
||||
[[ -z "$OUTPUT" ]] && OUTPUT="DSI-1"
|
||||
if [[ -n "$OUTPUT" ]] && command -v wlr-randr &>/dev/null; then
|
||||
wlr-randr --output "$OUTPUT" --transform 270
|
||||
fi
|
||||
Reference in New Issue
Block a user