Plugins
Build a tool, add a music service, or change how the player works with Lua.
Now Playing layouts
Arrange artwork, track details and playback controls in an XML layout.
Themes
Choose colors and icons, style the Home screen, and share your theme.
External apps
Package a native program for the SD card and run it from More.
Remote Control
Control the player from a phone, a computer or your own script.
Choose the part of Compás you want to make your own. Use a plugin to add features, an XML layout to rearrange Now Playing, or a theme to change colors and icons. You can try all three on your SD card without compiling the player.
Plugins
A plugin starts as a single Lua file in <SD card>/.plugins/. This example adds a row in Settings that opens a short message:
plugin.define({
id = "org.example.hello",
name = "Hello Player",
version = "1.0.0",
api_min = 17,
})
plugin.register_list_item("settings", "Hello Player", function()
plugin.show_list("Hello Player", { "Hello from Lua!" }, function()
plugin.show_toast("Your plugin is working!")
end)
end)
Save it as .plugins/Hello.lua. Insert the card, then open Settings > System > Plugin Manager > Refresh Plugins. The Hello Player row appears under Settings > System > Additional Tools. Tap it to see the message. Browse Plugin Store from Plugin Manager for published plugins.
Use the top level of your script to register rows and callbacks. Files in nested folders are not loaded as plugins. Give each plugin a unique, stable ID. The examples in these guides use API 17. Set api_min = 17 and check capabilities before using optional features. See PLUGINS.md for the complete API, sandbox rules, and examples.
Now Playing layouts
Layouts decide where the cover, track details, seek bar and buttons appear. Write one XML file, keep the player's required widget names, and let Compás connect them to playback. You can use the built-in images and fonts, add your own artwork, and give plugin controls their own actions.
Start with the Now Playing layout guide. It walks through the file locations, screen sizes and widget roles, with examples you can adapt.
Themes
A theme is a text file containing your colors and, optionally, icons and Home screen settings. Save this example as <SD card>/Themes/MyTheme.theme:
# My theme colors
name=My Theme
screen=0x101820
card=0x1B2838
list_row=0x223449
text_primary=0xF4F7FA
text_muted=0xAAB8C7
All six fields are required. The theme picker looks in Themes/ and up to two levels of subfolders. Colors accept decimal or 0x hexadecimal values from 0x000000 to 0xFFFFFF. Each setting is a key=value line; lines beginning with # are comments. From the player, open More > Themes and select your theme. Close and reopen the picker after adding a file so it rescans. A PNG preview is optional: place MyTheme.png beside MyTheme.theme to have it appear in the picker.
You can also set icon folders, individual icons, Home tile styles, and launcher appearance. See Writing a .theme file in PLUGINS.md for the full key list and the published theme package examples.
To publish a theme in Plugin Store, follow the individual theme packages in the compas-plugins repository. For example, ThemeCobaltSignal includes store.json, CobaltSignal.theme, a matching CobaltSignal.png preview, and a compatibility Lua stub. The store package installs the theme and preview under Themes/; use the package's store.json as the format example. The player can apply .theme files directly; you do not need the compatibility Lua file for that.
Themes change colors, icons, and supported Home styling. To redesign the Now Playing screen, create an XML player layout instead; see Player Layouts and the public plugin layout examples.
External apps
External apps are native programs you put on the SD card. The player lists them under More > External Apps and runs them full screen. See External apps.
Remote Control
The Android companion, Compás Tools, a browser or your own script can control the player over Wi-Fi, Bluetooth or USB. See Remote Control.