From 809adbd67afac4cf11d8226347255755c23ff684 Mon Sep 17 00:00:00 2001 From: kyle Date: Wed, 31 Dec 2025 04:26:55 -0800 Subject: [PATCH] Add rotate-now.sh --- rotate-now.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 rotate-now.sh diff --git a/rotate-now.sh b/rotate-now.sh new file mode 100644 index 0000000..ce98ab0 --- /dev/null +++ b/rotate-now.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Immediate rotation test - run this from your graphical terminal + +# Try xrandr first (for X11) +if command -v xrandr &> /dev/null; then + DISPLAY_NAME=$(xrandr --query 2>/dev/null | grep " connected" | head -n 1 | cut -d" " -f1) + if [ -n "$DISPLAY_NAME" ]; then + echo "Rotating display $DISPLAY_NAME left (90 degrees)..." + xrandr --output "$DISPLAY_NAME" --rotate left + echo "Done! Check your screen." + exit 0 + fi +fi + +# For Wayland, try wlr-randr +if command -v wlr-randr &> /dev/null; then + OUTPUT=$(wlr-randr | grep -m 1 "^.*" | cut -d' ' -f1) + if [ -n "$OUTPUT" ]; then + echo "Rotating display $OUTPUT 90 degrees (Wayland)..." + wlr-randr --output "$OUTPUT" --transform 90 + echo "Done! Check your screen." + exit 0 + fi +fi + +# For GNOME Wayland, use gsettings +if command -v gsettings &> /dev/null; then + echo "Attempting GNOME Wayland rotation..." + # Note: GNOME doesn't have a direct gsettings command for rotation + # You may need to use Settings > Displays > Orientation + echo "For Wayland, please use: Settings > Displays > Orientation > Portrait" +fi + +echo "Could not automatically rotate. Please check your display settings manually."