Skip to main content
Version: main

rofi

Generates a rofi theme as two .rasi files: a palette (tinct-colours.rasi) declaring every tinct role as a named rasi colour, and a main theme (tinct.rasi by default) that @imports the palette and applies opinionated styling for window, inputbar, listview, element and friends. Drop them in the user theme directory and select the main file via @theme "tinct" or rofi -theme tinct.

Installation

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

Quick start

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

Generated files

FilePathRole
tinct-colours.rasi~/.config/rofi/themes/tinct-colours.rasiPalette only. Declares every tinct role as a named rasi colour inside * { ... }. No widget rules. Importable into your own theme via @import "tinct-colours.rasi".
<theme-name>.rasi~/.config/rofi/themes/tinct.rasiMain theme. @imports the palette above, then styles window, inputbar, listview, element, etc. Filename matches --rofi.theme-name (default tinct).

Integration

Rofi looks for theme files in ~/.config/rofi/themes/ (and a few system locations). Select the tinct theme by adding one line to your ~/.config/rofi/config.rasi:

@theme "tinct"

Or invoke rofi with the theme on the command line, no config edit required:

rofi -show drun -theme tinct

Rofi resolves tinct to ~/.config/rofi/themes/tinct.rasi, which in turn @imports tinct-colours.rasi — both files must live alongside each other.

If you prefer to write your own rasi theme but want the tinct palette, skip @theme "tinct" and instead @import "tinct-colours.rasi" from your own theme:

@import "tinct-colours.rasi"

window {
background-color: @surface;
border-color: @accent1;
}

Reload behaviour

Automatic

None. Rofi reads its theme on every launch — there is no daemon to reload.

Manual fallback

Launch rofi again. The next invocation picks up the new theme.

Uninstall / revert

  1. Remove the theme selector from your ~/.config/rofi/config.rasi:

    sed -i '/@theme "tinct"/d' ~/.config/rofi/config.rasi

    (Skip this step if you only ever invoked rofi with -theme tinct on the command line.)

  2. Delete the generated files:

    rm ~/.config/rofi/themes/tinct.rasi ~/.config/rofi/themes/tinct-colours.rasi
  3. Reload to drop the theme: no action needed. The next rofi invocation uses your previous theme.

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

Flags

FlagDefaultDescription
--rofi.output-dir~/.config/rofi/themesOverride the output directory
--rofi.theme-nametinctTheme filename (without extension). Output is <theme-name>.rasi.

Colour role mapping

Every tinct role is declared as a named rasi colour in the * { ... } block of tinct-colours.rasi; the main theme @imports it and references the names via @<name>.

rasi nameTinct role
backgroundbackground
background-mutedbackgroundMuted
foregroundforeground
foreground-mutedforegroundMuted
surfacesurface
on-surfaceonSurface
surface-variantsurfaceVariant
on-surface-variantonSurfaceVariant
surface-container-lowestsurfaceContainerLowest
surface-container-lowsurfaceContainerLow
surface-containersurfaceContainer
surface-container-highsurfaceContainerHigh
surface-container-highestsurfaceContainerHighest
outlineoutline
outline-variantoutlineVariant
borderborder
accent1accent4accent1accent4
on-accent1on-accent4onAccent1onAccent4
dangerdanger
on-dangeronDanger
warningwarning
on-warningonWarning
successsuccess
on-successonSuccess
infoinfo
on-infoonInfo

Widget defaults wired in the template:

rofi widgetPropertyResolved role
windowbackground-colorsurface
windowborder-coloraccent1
inputbarbackground-colorsurfaceContainer
inputbartext-coloronSurface
prompttext-coloraccent1
element selectedbackground-color / text-coloraccent1 / onAccent1
element selected.urgentbackground-color / text-colordanger / onDanger
messagebackground-color / text-colorsurfaceContainerLow / onSurfaceVariant

Customising the template

Extract the default template to override it:

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

This writes ~/.config/tinct/templates/rofi/tinct.rasi.tmpl and ~/.config/tinct/templates/rofi/tinct-colours.rasi.tmpl. Tinct uses your versions in preference to the embedded defaults; override one, both, or neither.

See the templating reference for the available functions and palette accessors.

Troubleshooting

Failed to parse theme: tinct

Rofi looks for <name>.rasi in ~/.config/rofi/themes/. Confirm the file landed there:

ls -l ~/.config/rofi/themes/tinct.rasi
rofi -dump-theme -theme tinct | head

If you used --rofi.theme-name=other, the file is other.rasi and you select it with @theme "other" or rofi -theme other.

Theme didn't change

You're either still using the old rofi process (rofi exits after every menu, but if it didn't, kill it) or your config.rasi references a different theme via @theme. Run rofi -dump-theme | head -5 to see which theme rofi is actually loading.

rofi: command not found

The plugin lists rofi as a required binary. Install it via your distro's package manager.

  • fuzzel — Wayland-native launcher alternative.
  • wofi — another Wayland-native launcher.
  • walker — modern modular launcher.