Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add rotate screen button to Control Center

See original GitHub issue


I was wondering if a rotate screen button could be added to Control Center. It would give visual feedback as to what rotation the screen has and prompt the user after 3 seconds if they want to reboot the pi (the delay would give the user enough time to click the button multiple times until they get the desired rotation, every time they click the button the timer would reset).

After reboot the changes should take into effect!

These are the instructions on how to rotate the screen of the raspberry pi:

Here’s a bash script I wrote that rotates the screen of the RaspberryPi:

# run with sudo
# reboot raspberry pi for changes to take effect


# save default configuration file
if [ ! -f $ ]; then
    cp $CONFIG $

# get the rotation of the file

# override current config file to remove changes
cp $ $CONFIG

# rotate clause
if [ $ROTATION == 'display_rotate=0' ]; then
    echo 'display_rotate=1' >> $CONFIG
    echo 'display_rotate=1'
elif [ $ROTATION == 'display_rotate=1' ]; then
    echo 'display_rotate=2' >> $CONFIG
    echo 'display_rotate=2'
elif [ $ROTATION == 'display_rotate=2' ]; then
    echo 'display_rotate=3' >> $CONFIG
    echo 'display_rotate=3'
elif [ $ROTATION == 'display_rotate=3' ]; then
    echo 'display_rotate=0' >> $CONFIG
    echo 'display_rotate=0'
    echo 'display_rotate=1' >> $CONFIG
    echo 'display_rotate=1'

You could spawn a process that executes this script and the output of the script would give you the current rotation of the screen.

If you need any help adding this enhancement, I’d be happy to help!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

Bee-Marcommented, May 23, 2020

@istvanfedak I brought in your pull request to the develop branch yesterday. I’m doing a total rework of the cli options, and once that’s all done and merged up into develop, i’ll get your code fully integrated into the package

istvanfedakcommented, May 24, 2020

Awesome! Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

The screen rotation icon is missing from - iPad
The screen rotation icon is missing from the Control Center on an iPad Air 2. I can't find a way to find or...
Read more >
How to get your iPhone screen to rotate again - AppleToolBox
Go to Settings>Control Center and toggle ON both options “Access on Lock Screen” and “Access Within Apps.” Once these are both toggled on, ......
Read more >
How to automatically rotate your screen - Google Support
Open your device's Settings app Settings app . · Select Accessibility. · Select Auto-rotate screen.
Read more >
How to Change iPhone Rotation Lock Without ... - MacRumors
1. Launch the Settings app on your iPhone. 2. Tap Accessibility. 3. Under "Physical and Motor," tap Touch.
Read more >
iPhone Screen Not Rotating to Landscape Mode? Here's How ...
You can use AssistiveTouch, an iOS feature that comes in handy when your iPhone Home button isn't working, to force rotate your iPhone's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found