Skip to content
dsh.fish
Bundle

color-schemes

A DSH web GUI color-scheme plugin: a data-driven registry of themes (Catppuccin, Everforest, Nord) selectable from a settings row, with theme-adapted tooltips and hover cards. Add new schemes by dropping one file into ./schemes and rebuilding.

Source
hatanokokosa
stars
1 stars
License
BSD-2-Clause
Updated
Updated 22 hours ago

Readme

# color-schemes

A color-scheme plugin for the DSH web GUI. It registers a set of themes,
selectable from Settings > General > Color Scheme, and keeps hover popups
(tooltips, hover cards) consistent with the active theme.

Features:

- Seven built-in schemes: Catppuccin (Latte, Frappe, Macchiato, Mocha),
  Everforest (Dark, Light), Nord.
- The selected scheme persists across refresh and restart (localStorage,
  key `dsh.color-schemes.state`).
- Schemes are typed TypeScript data files in `schemes/`; a script rebuilds
  the client bundle. No UI code is touched when adding a scheme.

## Install

The package is a **bundle**: `package.json` declares `dsh.bundle.patch`
(`./cordis.patch.yml`), so installing it in any profile activates the
plugin row automatically.

The package is **not published to an npm registry yet**. Two current
sources:

Git:

```sh
dsh plugin --profile web add github:hatanokokosa/dsh-colorschemes
```

Tarball (offline or self-hosted; generated with `pnpm pack` in the package
directory):

```sh
dsh plugin --profile web add ./color-schemes-1.0.0.tgz
```

Then restart `dsh web`; the Color Scheme row appears in
Settings > General. The built `lib/` is committed in the repository, so
neither form needs a build step or build permission (a git install runs no
`prepare` script, so no pnpm `allowBuilds` is required).

Remove with `dsh plugin --profile web remove color-schemes`.

## Local development

Inside a profile (as in this repository) the package is linked as a file
dependency instead:

1. Put this package at `web/ext/color-schemes`.
2. Add to `web/package.json`:
   ```json
   "color-schemes": "file:./ext/color-schemes"
   ```
3. Add to `web/cordis.patch.yml`:
   ```yaml
   - insert:
       - id: color-schemes
         name: 'color-schemes'
   ```
4. Link the package into `web/node_modules` (or run the profile's
   package manager), then restart `dsh web`.

## Add a scheme

See [schemes/README.md](schemes/README.md). The short version: create
a new scheme file in `schemes/`, register it in `schemes/index.ts`, run
`npm run build`.

`lib/client.js` is generated and committed; running it requires no build
tooling. Building it requires Node >= 23.6 (native TypeScript type stripping)
plus the dev dependencies (`npm install` inside this package): `npm run build`
type-checks the sources with `tsc` and bundles `src/client.ts` + `schemes/*.ts`
with esbuild into the loader bundle.

## Uninstall

For a bundle install: `dsh plugin --profile web remove color-schemes`.

For a file-dependency install: remove the patch row from the profile's
`cordis.patch.yml`, the `color-schemes` entry from `web/package.json`, and
the `web/node_modules/color-schemes` link. The localStorage entry is inert
once the plugin is gone.

## License

BSD-2-Clause

Install

dsh plugin --profile web add github:hatanokokosa/dsh-colorschemes

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source