Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

ROCKNIX Thor theme scripts

Switch between Canvas DS, Dii-ess-aye, and the default ROCKNIX theme on the AYN Thor.

Usage guide

Install

  1. Install the themes you want to use under /storage/.config/emulationstation/themes. Use the folder names canvas-ds-thor for Canvas DS and dii-ess-aye for Dii-ess-aye. Both need their Thor-compatible layouts. The default theme uses ROCKNIX's existing system-theme folder.
  2. Copy this project's scripts/ directory to /storage/.config/rocknix-thor-theme-scripts/scripts on the Thor.
  3. Connect over SSH and run:
bash /storage/.config/rocknix-thor-theme-scripts/scripts/install.sh
  1. Refresh the game list or restart EmulationStation. The three theme switchers will appear in Ports. Other Ports files are left intact.

You only need to install the themes you want to use. Dii-ess-aye and the default option do not require Canvas DS.

Switch themes

Open Ports and launch the script for your desired theme:

Script What it does
apply_canvasds_theme_thor.sh Applies Canvas DS with both screens enabled.
apply_diiessaye_theme_thor.sh Applies Dii-ess-aye with both screens enabled.
apply_default_theme_thor.sh Restores the standard ROCKNIX theme and normal screen behavior.

Wait for the interface to restart. Your selection stays active after reboot. Use these switchers instead of a theme's separate activation script.

You can also run any of these scripts with Bash over SSH from /storage/roms/ports.

Update

Copy the updated project files into the same installation directory, then apply your desired theme again.

Remove

First run apply_default_theme_thor.sh and wait for the standard interface to return. Then remove the three theme switcher entries from /storage/roms/ports and delete /storage/.config/rocknix-thor-theme-scripts. You can keep the installed themes.

If switching fails

Check that the selected theme is installed with the folder name listed above and includes its Thor layout. For diagnostic logs, see Troubleshooting below.

Technical reference

This project owns the switchers, shared launcher, and compositor configuration. Theme artwork and layouts remain in their own projects.

Script reference

Every script in scripts/ is listed below. For normal use, run the installer once and then use the three apply_* entries in Ports; the remaining scripts are called automatically.

Script Called by What it does
install.sh You, during installation Checks that the three entry scripts exist, makes the scripts executable, and creates their symbolic links in Ports. It does not select a theme.
apply_canvasds_theme_thor.sh You, through Ports or SSH Calls switch_theme_thor.sh canvasds to select Canvas DS, set its Thor aspect ratio, and enable the dual-screen setup.
apply_diiessaye_theme_thor.sh You, through Ports or SSH Calls switch_theme_thor.sh diiessaye to select Dii-ess-aye and enable the dual-screen setup.
apply_default_theme_thor.sh You, through Ports or SSH Calls switch_theme_thor.sh default to select the stock theme and restore ROCKNIX's native launcher and display configuration.
switch_theme_thor.sh The three apply_* scripts Validates the selected theme and starts a detached systemd worker. The worker locks against concurrent switches, stops EmulationStation, removes previous launcher mounts and startup hooks, regenerates native display settings, updates theme preferences, installs the dual-screen startup hook when needed, and restarts Sway and EmulationStation. On failure, it attempts to restore the native launcher and display setup.
autostart_thor.sh The switch worker and ROCKNIX at boot If Canvas DS or Dii-ess-aye is selected, bind-mounts this project's start_es_thor.sh over /usr/bin/start_es.sh. Display configuration is deferred until Sway is running.
start_es_thor.sh ROCKNIX's essway service through the launcher mount Loads ROCKNIX's EmulationStation environment. For either supported dual-screen theme, calls enable_theme_thor.sh without remounting or recursively restarting, then launches EmulationStation at 4400×1080. For other themes, launches it without a resolution override.
enable_theme_thor.sh start_es_thor.sh Creates the virtual output when needed, writes and reloads the dual-screen Sway configuration, sets the selected theme's background, and applies menu and transition overrides. It also supports mounting the launcher and a one-time service restart when invoked directly; the shared launcher suppresses those steps.

Installation and startup

The installer creates symbolic links in /storage/roms/ports pointing to this project's entry scripts. Ports and autostart use links, so updating the installed project does not require updating separate copies.

Switching runs in a detached systemd service, allowing it to finish after EmulationStation closes the Ports session.

The dual-screen choices install /storage/.config/autostart/thor-theme.sh, linking to this project's startup hook. The hook bind-mounts the shared launcher over /usr/bin/start_es.sh. After Sway starts, the launcher applies the display setup and starts EmulationStation at 4400×1080.

Display configuration

Both dual-screen themes must support a 4400×1080 layout. The desktop is arranged as follows:

Output Size Horizontal position
Virtual output 1240×1080 x=0
Upper panel 1920×1080 x=1240
Lower panel 1240×1080 x=3160

The display setup lives in scripts/enable_theme_thor.sh. /storage/.config/sway/config is generated output. Canvas DS's wallpaper is used only when Canvas DS is selected.

Restoring the default setup

The default choice removes the custom startup hook and launcher mount, resets dual-screen menu and aspect overrides, invokes ROCKNIX's native hardware configuration generator, and restarts Sway to remove the virtual output. The lower screen returns to ROCKNIX's normal behavior. Other EmulationStation preferences are preserved.

Troubleshooting

Inspect the switch service's logs over SSH:

journalctl -u thor-theme-switch

A missing selected theme is rejected before the interface is stopped. Failures during switching attempt to restore the native launcher and display setup.

Dependencies

These scripts depend on ROCKNIX's essway and sway services, /usr/lib/autostart/common/111-sway-init, Bash, Python 3, and systemd-run. They are specific to the Thor's display geometry.

About

A repository of scripts to easily reapply themes on ROCKNIX on the AYN THOR.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages