Pillar

Making things for Pillar

A theme, or a plugin written in PSL. Each is one small file.

Two kinds

ThemesTen colours in a file. Works everywhere Pillar runs.
PluginsA few plain lines in PSL, the Pillar Smart Language. Pillar checks each line and carries it out, so a plugin can't run code of its own.

A theme

Make a file named after your theme, for example harbour.json:

{
  "id": "harbour",
  "name": "Harbour",
  "version": "1.0.0",
  "authors": ["Your name"],
  "palette": {
    "bg": "#16212b",
    "secondary": "#121b24",
    "tertiary": "#0d141b",
    "floating": "#1f2d3a",
    "raised": "#1f2d3a",
    "text": "#e3ecf2",
    "muted": "#8fa3b3",
    "accent": "#5fb3c9",
    "link": "#8fc7ff",
    "border": "#2a3b4a"
  }
}

The id has to match the file name. The ten colours:

bgChat and main backgrounds
secondarySidebars and secondary panels
tertiaryThe darkest layer, behind everything
floatingMenus, sheets, pop-ups
raisedCards, inputs, the message box
textNormal text and active icons
mutedSecondary text and idle icons
accentButtons, switches, mentions
linkLinks
borderDividers and outlines

Themes are for Discord's dark appearance, so keep backgrounds dark and text light. Status colours, warnings and badges are left as Discord has them.

Change the version whenever you change a colour. That's how phones already using it know to update.

You don't have to write the file by hand. On the phone, Settings, then Pillar, then Themes, then New theme opens a designer: pick each colour, add a picture behind the chat if you want one, and watch a preview as you go. Export as a file saves the result to the Prism folder, ready to share.

A plugin
PSL

A plugin is one file of plain lines. This one hides the typing line and server tags, each behind its own switch. Save it as quiet.psl:

plugin "Quiet"
about "Hides the typing line and server tags."
version 1.0.0
by "Your name"

switch typing "Hide the typing line" on
switch tags "Hide server tags" on

hide typing-indicator if $typing
hide server-tags if $tags

typing-indicator and server-tags are Pillar's names for those parts of Discord. Because the plugin never mentions how Discord is built, it keeps working when Discord changes, and it works on desktop too.

Plugins can also change text, add things like a server's member count beside its name, and have buttons that do something when pressed:

choice size "Text size"
option size 1.1 "A little bigger" default
option size 1.3 "Bigger"
text size $size

button readAll "Mark everything as read"
on readAll do mark-all-read

Everything a plugin can name is in the PCC, the Pillar Classifier Collection, and the whole language is on the API page. If what you want isn't there, ask for it: once it's added to the PCC, every plugin can use it.

Trying it

Open a pull request on prism-store with your file in its plugins folder. The store's check reads every line and tells you, by line number, anything that needs fixing.

To check before sending, in a copy of prism-store run node tools/build-index.mjs.

Getting listed

The list everyone sees is the prism-store repository. Open a pull request adding your files to its plugins or themes folder. Your authors line is the credit shown in the app.

PSL can't reach your login, the internet or anything Pillar doesn't allow, so the check is about whether a plugin is useful and does what it says. Plugins that run scripts aren't accepted.

Themes are only colours, so the only test is whether they look right.