mirror of
https://github.com/fairyglade/ly.git
synced 2026-02-04 00:14:55 +00:00
## 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  ## 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>
69 lines
1.3 KiB
Zig
69 lines
1.3 KiB
Zig
const std = @import("std");
|
|
|
|
pub const Animation = enum {
|
|
none,
|
|
doom,
|
|
matrix,
|
|
colormix,
|
|
gameoflife,
|
|
dur_file,
|
|
};
|
|
|
|
pub const DisplayServer = enum {
|
|
wayland,
|
|
shell,
|
|
xinitrc,
|
|
x11,
|
|
custom,
|
|
};
|
|
|
|
pub const Input = enum {
|
|
info_line,
|
|
session,
|
|
login,
|
|
password,
|
|
|
|
/// Moves the current Input forwards by one entry. If `reverse`, then the Input
|
|
/// moves backwards. If `wrap` is true, then the entry will wrap back around
|
|
pub fn move(self: *Input, reverse: bool, wrap: bool) void {
|
|
const maxNum = @typeInfo(Input).@"enum".fields.len - 1;
|
|
const selfNum = @intFromEnum(self.*);
|
|
if (reverse) {
|
|
if (wrap) {
|
|
self.* = @enumFromInt(selfNum -% 1);
|
|
} else if (selfNum != 0) {
|
|
self.* = @enumFromInt(selfNum - 1);
|
|
}
|
|
} else {
|
|
if (wrap) {
|
|
self.* = @enumFromInt(selfNum +% 1);
|
|
} else if (selfNum != maxNum) {
|
|
self.* = @enumFromInt(selfNum + 1);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
pub const ViMode = enum {
|
|
normal,
|
|
insert,
|
|
};
|
|
|
|
pub const Bigclock = enum {
|
|
none,
|
|
en,
|
|
fa,
|
|
};
|
|
|
|
pub const DurOffsetAlignment = enum {
|
|
topleft,
|
|
topcenter,
|
|
topright,
|
|
centerleft,
|
|
center,
|
|
centerright,
|
|
bottomleft,
|
|
bottomcenter,
|
|
bottomright,
|
|
};
|