mirror of https://github.com/fairyglade/ly.git
Allow en.ini load and add config to hide f1 commands
This commit is contained in:
parent
77f6958241
commit
6695a057a4
|
|
@ -32,6 +32,10 @@
|
||||||
#hide_borders = false
|
#hide_borders = false
|
||||||
#hide_borders = true
|
#hide_borders = true
|
||||||
|
|
||||||
|
# remove f1 commands
|
||||||
|
#hide_f1_commands = false
|
||||||
|
#hide_f1_commands = true
|
||||||
|
|
||||||
# number of visible chars on an input
|
# number of visible chars on an input
|
||||||
#input_len = 34
|
#input_len = 34
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,7 @@ void config_load(const char *cfg_path)
|
||||||
{"default_input", &config.default_input, config_handle_u8},
|
{"default_input", &config.default_input, config_handle_u8},
|
||||||
{"fg", &config.fg, config_handle_u8},
|
{"fg", &config.fg, config_handle_u8},
|
||||||
{"hide_borders", &config.hide_borders, config_handle_bool},
|
{"hide_borders", &config.hide_borders, config_handle_bool},
|
||||||
|
{"hide_f1_commands", &config.hide_f1_commands, config_handle_bool},
|
||||||
{"input_len", &config.input_len, config_handle_u8},
|
{"input_len", &config.input_len, config_handle_u8},
|
||||||
{"lang", &config.lang, config_handle_str},
|
{"lang", &config.lang, config_handle_str},
|
||||||
{"load", &config.load, config_handle_bool},
|
{"load", &config.load, config_handle_bool},
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ struct config
|
||||||
u8 default_input;
|
u8 default_input;
|
||||||
u8 fg;
|
u8 fg;
|
||||||
bool hide_borders;
|
bool hide_borders;
|
||||||
|
bool hide_f1_commands;
|
||||||
u8 input_len;
|
u8 input_len;
|
||||||
char* lang;
|
char* lang;
|
||||||
bool load;
|
bool load;
|
||||||
|
|
|
||||||
|
|
@ -107,11 +107,7 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
config_load(config_path);
|
config_load(config_path);
|
||||||
|
lang_load();
|
||||||
if (strcmp(config.lang, "en") != 0)
|
|
||||||
{
|
|
||||||
lang_load();
|
|
||||||
}
|
|
||||||
|
|
||||||
void* input_structs[3] =
|
void* input_structs[3] =
|
||||||
{
|
{
|
||||||
|
|
@ -177,7 +173,8 @@ int main(int argc, char** argv)
|
||||||
animate(&buf);
|
animate(&buf);
|
||||||
draw_box(&buf);
|
draw_box(&buf);
|
||||||
draw_labels(&buf);
|
draw_labels(&buf);
|
||||||
draw_f_commands();
|
if(!config.hide_f1_commands)
|
||||||
|
draw_f_commands();
|
||||||
draw_lock_state(&buf);
|
draw_lock_state(&buf);
|
||||||
position_input(&buf, &desktop, &login, &password);
|
position_input(&buf, &desktop, &login, &password);
|
||||||
draw_desktop(&desktop);
|
draw_desktop(&desktop);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue