Skip to main content
Version: 0.3.3

histui

Generates a GTK4 / libadwaita stylesheet for histui, a notification daemon. The output file does two jobs at once: it overrides the named libadwaita colours used by the default histui theme, and it exposes the full tinct palette as --tinct-* CSS custom properties for users writing bespoke themes.

Installation

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

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

Quick start

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

Generated files

FilePathRole
tinct-colors.css~/.config/histui/themes/tinct-colors.cssGTK4 CSS that @define-colors the libadwaita palette (window/view/accent/headerbar/popover) and exposes every tinct role as a --tinct-* CSS custom property under the * selector.

Integration

tinct-colors.css is meant to be imported by your active histui theme, not loaded directly. In ~/.config/histui/themes/theme.css (or whichever theme histui is configured to use):

@import "tinct-colors.css";
@import "default/theme.css";

The @define-color block must come before any theme that consumes those names — that's why tinct-colors.css is imported first. The default histui theme then automatically picks up the overridden window/view/accent/etc. colours.

If you're writing a custom theme, prefer the CSS custom properties:

.notification-popup {
background-color: var(--tinct-background);
color: var(--tinct-foreground);
border-color: var(--tinct-border);
}

For translucent variants use GTK4's alpha() function:

background-color: alpha(@window_bg_color, 0.85);

Reload behaviour

Automatic

None — Hooks().Reload is nil. The plugin only writes the file and prints an instruction line. histui watches its theme CSS for changes on some configurations, but tinct does not signal it.

Manual fallback

Pick whichever your setup honours:

touch ~/.config/histui/themes/theme.css # if histui hot-reloads on theme.css mtime

or

systemctl --user restart histui # full restart

or kill and re-launch the daemon by hand.

Uninstall / revert

  1. Remove the import line from your histui theme:

    sed -i '/@import "tinct-colors.css";/d' ~/.config/histui/themes/theme.css
  2. Delete the generated file:

    rm ~/.config/histui/themes/tinct-colors.css
  3. Reload to drop the styling:

    touch ~/.config/histui/themes/theme.css
    # or: systemctl --user restart histui
  4. External state: this plugin only writes to ~/.config/histui/themes/. No further cleanup is required.

Flags

FlagDefaultDescription
--histui.output-dir~/.config/histui/themesOverride the output directory

Colour role mapping

CSS name / propertyTinct roleNotes
@define-color window_bg_colorbackgroundlibadwaita window background
@define-color window_fg_colorforegroundlibadwaita window foreground
@define-color view_bg_colorsurfaceContent area background
@define-color view_fg_coloronSurfaceContent area foreground
@define-color accent_bg_coloraccent1Accent background
@define-color accent_fg_coloronAccent1Accent foreground
@define-color accent_coloraccent1Plain accent
@define-color bordersborderBorder colour
@define-color error_colordangerError / destructive
@define-color warning_colorwarningWarning
@define-color success_colorsuccessSuccess
@define-color card_bg_colorsurfaceCard background
@define-color card_fg_coloronSurfaceCard foreground
@define-color headerbar_bg_colorsurfaceContainerHeaderbar background
@define-color headerbar_fg_colorforegroundHeaderbar foreground
@define-color popover_bg_colorsurfaceContainerHighPopover background
@define-color popover_fg_colorforegroundPopover foreground
--tinct-background, --tinct-foregroundbackground, foregroundCore colours
--tinct-accent{1,2,3,4} and --tinct-accent{1,2,3,4}-mutedaccentsAll four accent ramps
--tinct-on-accent{1,2,3,4}onAccent{1..4}Accessible-on-accent foregrounds
--tinct-danger, --tinct-warning, --tinct-success, --tinct-infosemanticsStatus colours
--tinct-on-danger, --tinct-on-warning, --tinct-on-success, --tinct-on-infoonSemanticsAccessible foregrounds for the above
--tinct-surface, --tinct-on-surface, --tinct-surface-variant, --tinct-on-surface-variantsurface familyMaterial-style surface roles
--tinct-outline, --tinct-outline-variant, --tinct-border, --tinct-border-mutedoutlinesLines and dividers
--tinct-inverse-surface, --tinct-inverse-on-surface, --tinct-inverse-primaryinverseInverted regions (snackbars etc.)
--tinct-surface-container-{lowest,low,,high,highest}container elevationsMaterial elevation levels

Customising the template

Dump the default template to override it:

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

This writes ~/.config/tinct/templates/histui/tinct-colors.css.tmpl. Tinct uses your version in preference to the embedded default.

See the templating reference for available functions.

Troubleshooting

"Plugin skipped: histuid executable not found on $PATH and ~/.config/histui does not exist"

This is the deliberate skip condition: histui isn't installed and hasn't been configured. Install histui (which creates ~/.config/histui on first run) or mkdir -p ~/.config/histui to opt in.

Colours don't apply after generation

Two common causes:

  • Your theme.css doesn't @import "tinct-colors.css";. Without the import, the overrides never load. See Integration.
  • The @import line is after the theme that uses those colours. @define-color is order-sensitive — put tinct-colors.css first.

libadwaita app outside histui picked up the colours

@define-color only takes effect inside the stylesheet that loaded it. tinct-colors.css is loaded by histui's theme.css; other libadwaita apps are unaffected. Use the gtk4 or libadwaita plugins to theme those.

Wrong elevation tint on popovers

popover_bg_color is mapped to surfaceContainerHigh. If you want a flatter look, override the template and point it at surface or surfaceContainer.

  • libadwaita — system-wide libadwaita colour overrides.
  • gtk4 — GTK4 application theming.
  • dunst — alternative notification daemon for X11/Wayland users not on histui.