Here is a quick link to download a short video to see how it operates: You two options for installation:
- You can run the automated install using info in this repo: https://github.com/dikodahan/cs-hud-shortcuts. This will take care of everything listed below and you do not need to continue with this tutorial.
- You can follow the manual process listed here if you wish so.
You will need to SSH into your Circuit Gem/Sword to get this set up once. In my specific example, this is a Circuit Gem, but aside from some minor variations I will note below, the process is the same.
- First off, you will need to copy this image file here to your PC. Make sure it is saved as battery.png
- SSH to your Kite board.
- Go into the retromenu directory. Any sh file in this directory will automatically show up in RetroPie configuration menu.
Code: Select all
cd RetroPie/retropiemenu/
- Create a new shell script file to launch the script.
Code: Select all
nano battery.sh
- Paste the following lines in the file.
Code: Select all
#! /bin/sh sudo systemctl stop cs-hud.service if [[ -d "${HOME}/Circuit-Gem" ]]; then if grep -q "ExecStart=/home/pi/Circuit-Gem/cs-hud/cs-hud -s" "/lib/systemd/system/cs-hud.service"; then sudo sed -i 's/ExecStart=\/home\/pi\/Circuit-Gem\/cs-hud\/cs-hud -s/ExecStart=\/home\/pi\/Circuit-Gem\/cs-hud\/cs-hud/g' /lib/systemd/system/cs-hud.service else sudo sed -i 's/ExecStart=\/home\/pi\/Circuit-Gem\/cs-hud\/cs-hud/ExecStart=\/home\/pi\/Circuit-Gem\/cs-hud\/cs-hud -s/g' /lib/systemd/system/cs-hud.service fi elif [[ -d "${HOME}/Circuit-Sword" ]]; then if grep -q "ExecStart=/home/pi/Circuit-Sword/cs-hud/cs-hud -s" "/lib/systemd/system/cs-hud.service"; then sudo sed -i 's/ExecStart=\/home\/pi\/Circuit-Sword\/cs-hud\/cs-hud -s/ExecStart=\/home\/pi\/Circuit-Sword\/cs-hud\/cs-hud/g' /lib/systemd/system/cs-hud.service else sudo sed -i 's/ExecStart=\/home\/pi\/Circuit-Sword\/cs-hud\/cs-hud/ExecStart=\/home\/pi\/Circuit-Sword\/cs-hud\/cs-hud -s/g' /lib/systemd/system/cs-hud.service fi elif [[ -d "${HOME}/Circuit-Sword-Lite" ]]; then if grep -q "ExecStart=/home/pi/Circuit-Sword-Lite/cs-hud/cs-hud -s" "/lib/systemd/system/cs-hud.service"; then sudo sed -i 's/ExecStart=\/home\/pi\/Circuit-Sword-Lite\/cs-hud\/cs-hud -s/ExecStart=\/home\/pi\/Circuit-Sword-Lite\/cs-hud\/cs-hud/g' /lib/systemd/system/cs-hud.service else sudo sed -i 's/ExecStart=\/home\/pi\/Circuit-Sword-Lite\/cs-hud\/cs-hud/ExecStart=\/home\/pi\/Circuit-Sword-Lite\/cs-hud\/cs-hud -s/g' /lib/systemd/system/cs-hud.service fi else echo "It seems like Kite's CS-HUD software is not installed on your device :(" echo "Please follow Kite's guides and images to make sure it is installed: https://github.com/kiteretro" sleep 10s fi sudo systemctl daemon-reload sudo systemctl start cs-hud.service
- To save the file press Ctrl+x, Then y and then press Enter.
- Make the shell script executable:
Code: Select all
chmod +x battery.sh
- Now we need to update the RetroPie configuration menu to add this item properly.
Code: Select all
sudo nano /opt/retropie/configs/all/emulationstation/gamelists/retropie/gamelist.xml
- Scroll all the way down to the end of the file and just above the last line </gameList> add the following lines.
Code: Select all
<game> <path>./battery.sh</path> <name>Battery Indicator</name> <desc>Turns ON and OFF the battery indicator in Kite's HUD software.</desc> <image>./icons/battery.png</image> </game>
- To save the file press Ctrl+x, Then y and then press Enter.
- Close the SSH connection.
- Now you need to copy the battery.png file over to the following directory on your Circuit board: /home/pi/RetroPie/retropiemenu/icons
I will not cover how to copy a file over to RetroPie from a PC or a Mac in this tutorial. You can easily google this part. - From your HUD software perform a proper shutdown and turn your hand-held back on. You now have the battery indicator toggle easily accessible from RetroPie menu!!!