Skip to content

Instantly share code, notes, and snippets.

@Langerz82
Last active June 27, 2025 04:54
Show Gist options
  • Save Langerz82/9a2a6de33d0c3796af7f773aadd9d6ff to your computer and use it in GitHub Desktop.
Save Langerz82/9a2a6de33d0c3796af7f773aadd9d6ff to your computer and use it in GitHub Desktop.
emuelec - rotate_emu_station.sh
#!/bin/bash
# ABOUT - Rotate EmulationStation by overriding the service and applying the screen rotation argument.
# CREDITS - https://www.github.com/Langerz82 - Joshua L - 2025.
# WARNING - Use at your own risk.
# copy to /emuelec/bin and "chmod +x rotate_emu_station.sh" to allow script to execute.
# type in: "rotate_emu_station.sh 0" to restore rotation
# type in: "rotate_emu_station.sh 1" to rotate 90deg
# type in: "rotate_emu_station.sh 2" to rotate 180deg
# type in: "rotate_emu_station.sh 3" to rotate 270deg
function rotate_emu_station () {
if [[ "$1" == 0 ]]; then
rm -r /storage/.config/system.d/emustation.service.d
else
mkdir -p /storage/.config/system.d/emustation.service.d
echo [Service] > /storage/.config/system.d/emustation.service.d/override.conf
echo ExecStart= >> /storage/.config/system.d/emustation.service.d/override.conf
echo ExecStart=emulationstation --screenrotate $1 >> /storage/.config/system.d/emustation.service.d/override.conf
fi
systemctl daemon-reload
systemctl restart emustation
}
rotate_emu_station $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment