Skip to main content
Version: 0.3.3

rosec

Generates a ROsec prompt theme — the colours used by the rosec-prompt interactive prompt for backgrounds, borders, labels, inputs, and the success/danger button pair.

Installation

Built into tinct — nothing to install separately. tinct generate -o rosec works out of the box.

The plugin skips silently if neither ~/.config/rosec/config.toml exists nor rosec-prompt is on $PATH, so it's safe to leave in a multi-output invocation on hosts where rosec isn't installed.

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o rosec

Generated files

FilePathRole
tinct-theme.toml~/.config/rosec/tinct-theme.tomlTOML fragment containing a single [prompt.theme] table with every colour key rosec accepts. Not a complete rosec config — it's a partial that you merge into your config.toml.

Integration

rosec does not have an include or import mechanism, so you have to merge [prompt.theme] into your own config.toml by hand or with a TOML merge tool of your choice. The simplest copy-paste approach:

# View what tinct generated
cat ~/.config/rosec/tinct-theme.toml

# Manually replace the [prompt.theme] section in your config:
$EDITOR ~/.config/rosec/config.toml

If you maintain your rosec config under version control, a common pattern is to keep your non-theme settings in config.toml and use a small wrapper script that concatenates config.toml with tinct-theme.toml into rosec's effective config on demand.

Reload behaviour

Automatic

None — Hooks().Reload is nil. rosec reads its config on each prompt invocation, so any new prompt after you've merged the theme will already use the new colours; there is nothing to signal.

Manual fallback

After merging tinct-theme.toml into config.toml, just trigger a new prompt — colours update on the next rosec-prompt invocation.

Uninstall / revert

  1. Remove the config block from ~/.config/rosec/config.toml: delete (or revert) the [prompt.theme] table you merged in from tinct-theme.toml.

  2. Delete the generated file:

    rm ~/.config/rosec/tinct-theme.toml
  3. Reload to drop the theme: nothing to reload — the next rosec-prompt invocation will use whatever [prompt.theme] remains in config.toml (or rosec's defaults if you removed it entirely).

  4. External state: this plugin only writes to ~/.config/rosec/. No further cleanup is required.

Flags

FlagDefaultDescription
--rosec.output-dir~/.config/rosecOverride the output directory

Colour role mapping

[prompt.theme] keyTinct roleNotes
backgroundbackground (+ cc alpha)Prompt background, ~80% opacity
foregroundforegroundMain text
border_coloraccent1Border around the prompt
label_colorforegroundMutedField labels
accent_coloraccent1Highlighted UI bits
danger_colordangerDestructive states
input_backgroundsurfaceText-input field
input_textforegroundText inside the input field
confirm_backgroundsuccessConfirm button background
confirm_textforegroundConfirm button text
cancel_backgroundbackgroundMutedCancel button background
cancel_textforegroundMutedCancel button text

All colours except background are emitted with full alpha via hexAlpha; background uses an explicit cc suffix (~80% opacity).

Customising the template

Dump the default template to override it:

tinct plugins templates dump -o rosec -l ~/.config/tinct/templates/rosec

This writes ~/.config/tinct/templates/rosec/tinct-theme.toml.tmpl. Tinct uses your version in preference to the embedded default.

See the templating reference for available functions.

Troubleshooting

"Plugin skipped: neither rosec config nor rosec-prompt binary found"

The plugin only writes when there's something to write to. Install rosec-prompt, or create ~/.config/rosec/config.toml (even empty) to opt in.

Theme generates but rosec still looks the same

tinct-theme.toml is a fragment, not a full config. Until you merge [prompt.theme] into config.toml, rosec doesn't see it. See Integration.

Background looks too transparent / too opaque

The template hard-codes the background alpha at cc (~80%). Dump the template and change the suffix on the background line (or pipe through hexAlpha instead).

  • dunst, histui — notification daemons themed alongside the prompt.