Skip to main content
Version: main

hyprlock

Generates a colour palette for Hyprlock, the screen locker for Hyprland. The output is a single hyprlang config that declares every tinct role as a $tinct_* variable in three formats (rgb, hex, and rgba with sensible default alphas), plus a fully commented example layout for background, input-field and label blocks.

Installation

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

Quick start

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

Generated files

FilePathRole
tinct-hyprlock.conf~/.config/hypr/tinct-hyprlock.confPalette + commented example. Defines $tinct_background, $tinct_accent1, etc. in rgb / hex / rgba variants. The bottom half contains commented background, input-field and label blocks ready to uncomment.

When tinct is run with a wallpaper input the file also defines $tinct_wallpaper pointing at the wallpaper path.

Generated format

# Hyprlock theme generated by tinct

general {
hide_cursor = true
}

background {
path = screenshot
color = rgba(30, 30, 46, 1.0)
blur_passes = 3
blur_size = 8
}

input-field {
size = 200, 50
outline_thickness = 3
dots_size = 0.33
dots_spacing = 0.15
outer_color = rgba(137, 180, 250, 1.0)
inner_color = rgba(30, 30, 46, 1.0)
font_color = rgba(205, 214, 244, 1.0)
fade_on_empty = true
placeholder_text = <i>Password...</i>
}

Integration

Hyprlock reads ~/.config/hypr/hyprlock.conf and supports include directives. Add one line to your hyprlock.conf:

source = ~/.config/hypr/tinct-hyprlock.conf

Then reference any $tinct_* variable in your existing config:

background {
monitor =
path = $tinct_wallpaper
color = $tinct_background
blur_passes = 3
}

input-field {
inner_color = $tinct_background_rgba
outer_color = $tinct_accent1_rgba
check_color = $tinct_success_rgba
fail_color = $tinct_danger_rgba
font_color = $tinct_foreground
}

If you don't have a hyprlock.conf yet, copy the commented-out example blocks from the bottom of tinct-hyprlock.conf as your starting point.

Reload behaviour

Automatic

None. Hyprlock reads its config when invoked — there is no running daemon to signal.

Manual fallback

The next hyprlock invocation picks up the new colours. If a lock session is already on screen, unlock it and re-lock to apply the theme.

Uninstall / revert

  1. Remove the include line from your ~/.config/hypr/hyprlock.conf:

    sed -i '/tinct-hyprlock\.conf/d' ~/.config/hypr/hyprlock.conf
  2. Delete the generated file:

    rm ~/.config/hypr/tinct-hyprlock.conf
  3. Reload to drop the theme: next hyprlock invocation uses your previous styling. Nothing to reload while running.

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

Flags

FlagDefaultDescription
--hyprlock.output-dir~/.config/hyprOverride the output directory

Colour role mapping

Every variable is emitted in three formats so you can pick whichever fits the property you're styling:

Variable familyFormatUse for
$tinct_<role>rgb(r,g,b)Properties that want opaque colour: color, font_color.
$tinct_<role>_hexbare hex (no #)Properties that want raw hex (legacy hyprlock keys).
$tinct_<role>_rgbargba(r,g,b,a)Properties with translucency: inner_color, outer_color.

Roles emitted:

Role variableTinct roleDefault alpha (rgba variant)
$tinct_backgroundbackground0.93
$tinct_background_mutedbackgroundMuted0.80
$tinct_foregroundforeground1.00
$tinct_foreground_mutedforegroundMuted0.87
$tinct_accent1accent11.00
$tinct_accent2accent21.00
$tinct_accent3accent31.00
$tinct_accent4accent41.00
$tinct_dangerdanger1.00
$tinct_warningwarning1.00
$tinct_successsuccess1.00
$tinct_infoinfo1.00

When tinct is run with a wallpaper, $tinct_wallpaper is set to the wallpaper's absolute path.

Customising the template

Extract the default template to override it:

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

This creates ~/.config/tinct/templates/hyprlock/tinct.conf.tmpl. Tinct uses your version in preference to the embedded default.

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

Troubleshooting

unknown variable: $tinct_background

You haven't sourced tinct-hyprlock.conf from your hyprlock.conf, or the source = directive comes after the line that uses the variable. Move source = ~/.config/hypr/tinct-hyprlock.conf to the top of the file.

Lock screen still shows old colours

Hyprlock evaluates its config when invoked, not while running. Unlock the screen and lock again to pick up the new theme.

hyprlock: command not found

The plugin lists hyprlock as a required binary because there's no point generating a theme for an app that isn't installed. Install hyprlock via your distro's package manager or build it from the upstream repository.

  • hyprland — compositor styling.
  • hyprpaper — wallpaper manager; shares the $tinct_wallpaper path.