Add test-rotate.sh
This commit is contained in:
24
test-rotate.sh
Normal file
24
test-rotate.sh
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Test script to rotate display - run this manually first!
|
||||||
|
|
||||||
|
echo "Testing display rotation..."
|
||||||
|
echo "Current display configuration:"
|
||||||
|
xrandr --query | grep " connected"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Attempting to rotate display left (90 degrees)..."
|
||||||
|
DISPLAY_NAME=$(xrandr --query 2>/dev/null | grep " connected" | head -n 1 | cut -d" " -f1)
|
||||||
|
|
||||||
|
if [ -n "$DISPLAY_NAME" ]; then
|
||||||
|
echo "Found display: $DISPLAY_NAME"
|
||||||
|
xrandr --output "$DISPLAY_NAME" --rotate left
|
||||||
|
echo "Rotation applied! Check your screen."
|
||||||
|
echo ""
|
||||||
|
echo "If the rotation looks correct, you can enable autostart by running:"
|
||||||
|
echo " mv ~/.config/autostart/rotate-display.desktop.disabled ~/.config/autostart/rotate-display.desktop"
|
||||||
|
echo ""
|
||||||
|
echo "To revert the rotation, run:"
|
||||||
|
echo " xrandr --output $DISPLAY_NAME --rotate normal"
|
||||||
|
else
|
||||||
|
echo "Error: Could not detect display"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user