[dur] Add support for alignments and negative offsets + Ly logo (#893)

## What are the changes about?
Add support for letting a user use a negative offset (#880), alignment, and logo. Below is example of the logo file, I hope it is what was request :). It has no padding so a user can move the alignment and offset to get it how they want on screen.

This technically is good to go, except I didn't upload the logo file as I'm not sure where to add the animation file to get it to here: $CONFIG_DIRECTORY/ly/example.dur

![logo-preview](/attachments/5a829dbd-7708-4d0a-9841-d024902ede68)

## What existing issue does this resolve?

#880

## Pre-requisites

- [x] I have tested & confirmed the changes work locally

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/893
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: hynak <hynak@noreply.codeberg.org>
Co-committed-by: hynak <hynak@noreply.codeberg.org>
This commit is contained in:
hynak
2026-01-25 23:08:42 +01:00
committed by AnErrupTion
parent 2eea683078
commit a4076b83da
7 changed files with 116 additions and 34 deletions

View File

@@ -5,6 +5,7 @@ const Animation = enums.Animation;
const Input = enums.Input;
const ViMode = enums.ViMode;
const Bigclock = enums.Bigclock;
const DurOffsetAlignment = enums.DurOffsetAlignment;
allow_empty_password: bool = true,
animation: Animation = .none,
@@ -43,8 +44,9 @@ doom_top_color: u32 = 0x00FF0000,
doom_middle_color: u32 = 0x00FFFF00,
doom_bottom_color: u32 = 0x00FFFFFF,
dur_file_path: []const u8 = build_options.config_directory ++ "/ly/example.dur",
dur_x_offset: u32 = 0,
dur_y_offset: u32 = 0,
dur_offset_alignment: DurOffsetAlignment = .center,
dur_x_offset: i32 = 0,
dur_y_offset: i32 = 0,
edge_margin: u8 = 0,
error_bg: u32 = 0x00000000,
error_fg: u32 = 0x01FF0000,