mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-21 03:34:54 +00:00
Add Farsi Bigclock (#673)
* Change config type for bigclock * Seprates big clock's hard codes from its logic * Adds Farsi (fa) to big clock langs * Minor changes * Makes requested changes
This commit is contained in:
@@ -4,13 +4,14 @@ const enums = @import("../enums.zig");
|
||||
const Animation = enums.Animation;
|
||||
const Input = enums.Input;
|
||||
const ViMode = enums.ViMode;
|
||||
const Bigclock = enums.Bigclock;
|
||||
|
||||
animation: Animation = .none,
|
||||
animation_timeout_sec: u12 = 0,
|
||||
asterisk: ?u8 = '*',
|
||||
auth_fails: u64 = 10,
|
||||
bg: u16 = 0,
|
||||
bigclock: bool = false,
|
||||
bigclock: Bigclock = .none,
|
||||
blank_box: bool = true,
|
||||
border_fg: u16 = 8,
|
||||
box_title: ?[]const u8 = null,
|
||||
|
||||
@@ -85,6 +85,22 @@ pub fn configFieldHandler(_: std.mem.Allocator, field: ini.IniField) ?ini.IniFie
|
||||
return null;
|
||||
}
|
||||
|
||||
if (std.mem.eql(u8, field.key, "bigclock")) {
|
||||
// The option now uses a string (which then gets converted into an enum) instead of an boolean
|
||||
// It also includes the ability to change active bigclock's language
|
||||
var mapped_field = field;
|
||||
|
||||
if (std.mem.eql(u8, field.value, "true")){
|
||||
mapped_field.value = "en";
|
||||
mapped_config_fields = true;
|
||||
}else if (std.mem.eql(u8, field.value, "false")){
|
||||
mapped_field.value = "none";
|
||||
mapped_config_fields = true;
|
||||
}
|
||||
|
||||
return mapped_field;
|
||||
}
|
||||
|
||||
return field;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user